<xf:if is="$widgetPosition.isInsert()">
	<xf:title>{{ phrase('add_widget_position') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_widget_position:') }} {$widgetPosition.title}</xf:title>
</xf:if>

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

<xf:form action="{{ link('widgets/positions/save', $widgetPosition) }}" class="block" ajax="true">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="position_id" value="{$widgetPosition}"
				label="{{ phrase('position_id') }}"
				dir="ltr" />

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

			<xf:codeeditorrow name="description" value="{$widgetPosition}"
				mode="html" data-line-wrapping="true"
				class="codeEditor--autoSize codeEditor--proportional"
				label="{{ phrase('description') }}"
				hint="{{ phrase('you_may_use_html') }}" />

			<xf:checkboxrow>
				<xf:option name="active" value="1" selected="$widgetPosition.active">{{ phrase('widget_position_is_active') }}</xf:option>
			</xf:checkboxrow>

			<xf:macro id="addon_macros::addon_edit" arg-addOnId="{$widgetPosition.addon_id}" />
		</div>
		<xf:submitrow sticky="true" icon="save" />
	</div>
</xf:form>