<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}"
				label="{{ phrase('base_class_name') }}"
				dir="ltr" />

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

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

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

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

</xf:form>