{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"}
{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 form=$form} {form_field form=$form field='success_url'} {/form_field} {form_field form=$form field='id'} {/form_field} {form_field form=$form field='locale'} {/form_field} {if $form_error}
{$form_error_message}
{/if} {form_field form=$form field='name'}
{/form_field} {form_field form=$form field='secured'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='subject'}
{/form_field}

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

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

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

{form_field form=$form field='text_layout_file_name'}
{/form_field}
{form_field form=$form field='text_template_file_name'}
{if ! empty($value)}{$disable_text='readonly="true"'}{/if} {/form_field}
{form_field form=$form field='text_message'}
{$value}
{/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}
{/loop} {elseloop rel="message_edit"}
{intl l="Sorry, message ID=%id was not found." id={$message_id}}
{/elseloop}
{/block} {block name="javascript-initialization"} {/block} {block name="javascript-last-call"} {module_include location='message-edit-js'} {/block}