<xf:if is="$tag.isInsert()">
	<xf:title>{{ phrase('add_tag') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_tag:') }} {$tag.tag}</xf:title>
</xf:if>

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

<xf:form action="{{ link('tags/save', $tag) }}" ajax="true" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="tag" value="{$tag.tag}" maxlength="{{ max_length($tag, 'tag') }}"
				label="{{ phrase('tag') }}" />

			<xf:textboxrow name="tag_url" value="{$tag.tag_url}"
				maxlength="{{ max_length($tag, 'tag_url') }}"
				label="{{ phrase('url_version') }}"
				explain="{{ phrase('this_uniquely_identify_this_tag_in_url') }}"
				dir="ltr" />

			<xf:checkboxrow>
				<xf:option name="permanent" selected="{$tag.permanent}"
					label="{{ phrase('permanent') }}"
					hint="{{ phrase('making_tag_permanent_prevents_it_from_being_removed') }}" />
			</xf:checkboxrow>
		</div>

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