<xf:if is="$event.isInsert()">
	<xf:title>{{ phrase('add_code_event') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_code_event:') }} {$event.event_id}</xf:title>
</xf:if>

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

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

			<xf:codeeditorrow name="description" value="{$event.description}" mode="html"
				label="{{ phrase('description') }}"
				hint="{{ phrase('you_may_use_html') }}" />

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

</xf:form>