1 {extends file="page.tpl"}
4 {if isset($trans) && $trans|@count > 0}
5 <div clasis="bigtable">
7 <form action="{path_for name="dynamicTranslations"}" method="get" enctype="multipart/form-data" id="select_orig">
9 <label for="text_orig">{_T string="Choose label to translate"}</label>
10 <select name="text_orig" id="text_orig">
11 {html_options values=$orig output=$orig selected=$text_orig}
13 <noscript> <span><input type="submit" value="{_T string="Change"}" /></span></noscript>
18 <form action="{path_for name="editDynamicTranslation"}" method="post" enctype="multipart/form-data">
21 <span>{_T string="Original text: '%s'" pattern='/%s/' replace=$text_orig|escape}</span>
22 <input type="hidden" name="new" value="true"/>
25 <fieldset class="cssform">
26 <legend class="ui-state-active ui-corner-top">{_T string="Translation of '%s' label" pattern="/%s/" replace=$text_orig|escape}</legend>
27 {section name="lang" loop=$trans}
29 <label for="text_trans_{$trans[lang].key}" class="bline">{$trans[lang].name}</label>
30 <input type="text" name="text_trans_{$trans[lang].key}" id="text_trans_{$trans[lang].key}" value="{if $trans[lang].text}{$trans[lang].text|escape}{/if}"/>
31 <input type=hidden name="text_orig" value="{$text_orig|escape}"/>
36 <div class="button-container">
37 <button type="submit" name="trans" class="action">
38 <i class="fas fa-save fa-fw"></i> {_T string="Save"}
43 <p>{_T string="No fields to translate."}</p>
47 {block name="javascripts"}
49 <script type="text/javascript">
50 $('#text_orig').change(function(e) {
52 var _selected = $('#text_orig option:selected').val();
53 var _form = $('#select_orig');
54 _form.attr('action', _form.attr('action') + '/' + _selected)
55 $('#select_orig').submit();