<xf:if is="$prefix.isInsert()">
	<xf:title>{{ phrase('add_prefix') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_prefix:') }} {$prefix.title}</xf:title>
</xf:if>

<xf:pageaction if="$prefix.isUpdate()">
	<xf:button href="{{ link($linkPrefix . '/delete', $prefix) }}" icon="delete" overlay="true" />
</xf:pageaction>

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

			<xf:textboxrow name="title" value="{$prefix}"
				label="{{ phrase('title') }}" />

			<xf:if is="$prefix.hasRelation('MasterDescription')">
				<xf:codeeditorrow name="description" value="{$prefix}"
					mode="html" data-line-wrapping="true"
					rows="1"
					readonly="0"
					class="codeEditor--autoSize"
					label="{{ phrase('description') }}"
					explain="{{ phrase('prefix_description_explain') }}" />
			</xf:if>

			<xf:if is="$prefix.hasRelation('MasterUsageHelp')">
				<xf:codeeditorrow name="usage_help" value="{$prefix}"
					mode="html" data-line-wrapping="true"
					readonly="0"
					class="codeEditor--autoSize"
					label="{{ phrase('prefix_usage_help') }}"
					explain="{{ phrase('prefix_usage_help_explain') }}" />
			</xf:if>

			<xf:macro id="base_prefix_edit_macros::display_style" arg-prefix="{$prefix}"
				arg-displayStyles="{$displayStyles}" />

			<hr class="formRowSep" />

			<xf:macro id="base_prefix_edit_macros::prefix_groups" arg-prefix="{$prefix}"
				arg-prefixGroups="{$prefixGroups}" />

			<xf:macro id="display_order_macros::row" arg-value="{$prefix}" />

			<hr class="formRowSep" />

			<xf:macro id="helper_user_group_edit::checkboxes"
				arg-selectedUserGroups="{{ $prefix.prefix_id ? $prefix.allowed_user_group_ids : [-1] }}" />

			{$extraOptions|raw}
		</div>
		<xf:submitrow sticky="true" icon="save" />
	</div>
</xf:form>