<xf:if is="$extension.isInsert()">
	<xf:title>{{ phrase('add_extension') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_extension:') }} {$extension.to_class}</xf:title>
</xf:if>

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

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

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

			<xf:numberboxrow name="execute_order" value="{$extension.execute_order}" min="0"
				label="{{ phrase('execution_order') }}" />

			<xf:checkboxrow>
				<xf:option name="active" selected="$extension.active">{{ phrase('enable_extension') }}</xf:option>
			</xf:checkboxrow>

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

</xf:form>