<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}"
				label="{{ phrase('title') }}" />

			<xf:textarearow name="description" value="{$group}"
				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 id="display_order_macros::row" arg-value="{$group}" />

			<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 id="addon_macros::addon_edit" arg-addOnId="{$group.addon_id}" />
		</div>

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