<xf:macro id="common_options" arg-field="!"
	arg-supportsRequired="{{ true }}"
	arg-supportsUserEditable="{{ false }}"
	arg-supportsEditableOnce="{{ false }}"
	arg-supportsModeratorEditable="{{ false }}"
	arg-supportsGroupEditable="{{ false }}">

	<xf:checkboxrow hideempty="true">
		<xf:if is="$supportsRequired">
			<xf:option name="required" selected="$field.required">{{ phrase('field_is_required') }}</xf:option>
		</xf:if>
		<xf:if is="$supportsUserEditable">
			<xf:option name="user_editable" value="yes" selected="$field.user_editable != 'never'"
				label="{{ phrase('user_editable') }}">

				<xf:checkbox>
					<xf:if is="$supportsEditableOnce">
						<xf:option name="user_editable" value="once" selected="$field.user_editable == 'once'">{{ phrase('editable_only_once') }}</xf:option>
					</xf:if>
				</xf:checkbox>
			</xf:option>
		</xf:if>
		<xf:if is="$supportsModeratorEditable">
			<xf:option name="moderator_editable" selected="$field.moderator_editable">{{ phrase('moderator_editable') }}</xf:option>
		</xf:if>
	</xf:checkboxrow>

	<xf:if is="$supportsGroupEditable">
		<xf:macro id="helper_user_group_edit::checkboxes"
			arg-label="{{ phrase('editable_by_user_groups') }}"
			arg-id="editable_user_group"
			arg-selectedUserGroups="{{ $field.field_id ? $field.editable_user_group_ids : [-1] }}" />
	</xf:if>
</xf:macro>