<xf:if is="$permission.isInsert()">
	<xf:title>{{ phrase('add_admin_permission') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_admin_permission:') }} {$permission.title}</xf:title>
</xf:if>

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

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

			<xf:textboxrow name="admin_permission_id" value="{$permission.admin_permission_id}"
				maxlength="{{ max_length($permission, 'admin_permission_id') }}"
				label="{{ phrase('permission_id') }}"
				dir="ltr" />

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

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

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

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