<xf:if is="$group.isInsert()">
	<xf:title>{{ phrase('add_option_group') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_option_group:') }} {$group.title}</xf:title>
</xf:if>

<xf:if is="$group.isUpdate()">
	<xf:breadcrumb href="{{ link('options/groups', $group) }}">{$group.title}</xf:breadcrumb>

	<xf:pageaction>
		<xf:button href="{{ link('options/groups/delete', $group) }}" icon="delete" overlay="true" />
	</xf:pageaction>
</xf:if>

<xf:form action="{{ link('options/groups/save', $group) }}" ajax="true" class="block">
	<div class="block-container">
		<div class="block-body">

			<xf:textboxrow name="group_id" value="{$group.group_id}"
				label="{{ phrase('group_id') }}"
				dir="ltr" />

			<hr class="formRowSep" />

			<xf:textboxrow name="title" value="{{ $group.exists() ? $group.MasterTitle.phrase_text : '' }}"
				label="{{ phrase('title') }}" />

			<xf:textarearow name="description" value="{{ $group.exists() ? $group.MasterDescription.phrase_text : '' }}"
				autosize="true"
				label="{{ phrase('description') }}"
				hint="{{ phrase('you_may_use_html') }}" />

			<xf:textboxrow name="icon" value="{$group.icon}"
				label="{{ phrase('icon') }}" />

			<hr class="formRowSep" />

			<xf:macro template="display_order_macros" name="row"
				arg-value="{$group.display_order}" />

			<xf:checkboxrow>
				<xf:option name="advanced" selected="{$group.advanced}">{{ phrase('show_in_advanced_mode_only') }}</xf:option>
				<xf:option name="debug_only" selected="{$group.debug_only}">{{ phrase('display_this_group_in_debug_mode_only') }}</xf:option>
			</xf:checkboxrow>

			<xf:macro template="addon_macros" name="addon_edit" arg-addOnId="{$group.addon_id}" />
		</div>

		<xf:submitrow icon="save" />
	</div>
</xf:form>