1 {extends file="page.tpl"}
5 <form action="{path_for name="changeText"}" method="post" enctype="multipart/form-data">
6 <strong>{_T string="Choose an entry"}</strong><br/>
7 <label for="sel_lang">{_T string="Language:"}</label>
8 <select name="sel_lang" id="sel_lang" class="lang">
9 {foreach item=langue from=$langlist}
10 <option value="{$langue->getID()}" {if $cur_lang eq $langue->getID()}selected="selected"{/if}>{$langue->getName()}</option>
14 <label for="sel_ref">{_T string="Reference:"}</label>
15 <select name="sel_ref" id="sel_ref">
16 {foreach item=ref from=$reflist}
17 <option value="{$ref.tref}" {if $cur_ref eq $ref.tref}selected="selected"{/if} >{$ref.tcomment}</option>
20 <noscript> <span><input type="submit" value="{_T string="Change"}" /></span></noscript>
24 <form action="{path_for name="texts"}" method="post" enctype="multipart/form-data">
25 <div class="bigtable">
26 <fieldset class="cssform" id="{$mtxt->tlang}">
27 <legend class="ui-state-active ui-corner-top">{$mtxt->tcomment}</legend>
29 <label for="tsubject" class="bline">{_T string="Email Subject"}</label>
30 <input type="text" name="text_subject" id="tsubject" value="{$mtxt->tsubject}" maxlength="255" size="32"/> <span class="exemple">{_T string="(Max 255 characters)"}</span>
33 <label id="body_label" for="text_body" class="bline vtop">{_T string="Email Body:"}</label>
34 <textarea name="text_body" id="text_body" cols="64" rows="15">{$mtxt->tbody}</textarea>
38 <div class="button-container">
39 <input type="hidden" name="cur_lang" value="{$cur_lang}"/>
40 <input type="hidden" name="cur_ref" value="{$cur_ref}"/>
41 <input type="hidden" name="valid" id="valid" value="1"/>
42 <button type="submit" class="action">
43 <i class="fas fa-save fa-fw"></i> {_T string="Save"}
47 {include file="replacements_legend.tpl" legends=$texts->getLegend() cur_ref=$cur_ref}
50 {block name="javascripts"}
51 <script type="text/javascript">
53 $('#sel_ref, #sel_lang').change(function() {
54 $(':input[type="submit"]').attr('disabled', 'disabled');
55 //Change the input[@id='value'] ; we do not want to validate, but to change lang/ref
56 $('#valid').attr('value', (this.id === 'sel_lang') ? 'change_lang' : 'change_text');
60 _addLegenButton('fieldset > p:nth-child(2)');