{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Edit a mailing template'}{/block} {block name="check-resource"}admin.configuration.message{/block} {block name="check-access"}update{/block} {block name="main-content"}
{loop name="message_edit" type="message" secured="*" id="$message_id" backend_context="1" lang="$edit_language_id"}
{hook name="message-edit.top" message_id=$message_id}
{intl l='Edit mailing template "%name"' name={$NAME}}
{form name="thelia.admin.message.modification"} {* Be sure to get the message ID, even if the form could not be validated *} {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/messages'}"} {form_hidden_fields exclude="success_url,locale"} {render_form_field field='success_url' value="{url path='/admin/configuration/messages'}"} {render_form_field field='locale' value="{$edit_language_locale}"} {if $form_error}
{$form_error_message}
{/if} {render_form_field field='name'} {render_form_field field='secured'} {render_form_field field='title'} {render_form_field field='subject'}

### {intl l="HTML version of this message"}

{custom_render_form_field field='html_layout_file_name'}
{/custom_render_form_field}
{custom_render_form_field field='html_template_file_name'}
{if ! empty($value)}{$disable_html='readonly="true"'}{/if} {/custom_render_form_field}
{custom_render_form_field field='html_message'} {$value nofilter}
{/custom_render_form_field}

### {intl l="Text version of this message"}

{custom_render_form_field field='text_layout_file_name'}
{/custom_render_form_field}
{custom_render_form_field field='text_template_file_name'}
{if ! empty($value)}{$disable_text='readonly="true"'}{/if} {/custom_render_form_field}
{custom_render_form_field field='text_message'} {$value nofilter}
{/custom_render_form_field}

{intl l='Message created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}

{/form}
{form name="thelia.admin.message.send-sample"} {form_field field="recipient_email"}
{$label} *
{/form_field}
{/form}

{intl l="Variables to inject"}
{intl l='Name'} | {intl l='Value'}
--- | ---
{intl l="Add a variable"}

{hook name="message-edit.bottom" message_id=$message_id} {/loop} {elseloop rel="message_edit"}
{intl l="Sorry, message ID=%id was not found." id={$message_id}}
{/elseloop}

### {intl l="Test email result"}

{/block} {block name="javascript-initialization"}
{/block} {block name="javascript-last-call"} {hook name="message.edit-js" location="message-edit-js" message_id={$message_id} } {/block}