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>
14 {include file="forms_types/csrf.tpl"}
19 <form action="{path_for name="editDynamicTranslation"}" method="post" enctype="multipart/form-data">
22 <span>{_T string="Original text: '%s'" pattern='/%s/' replace=$text_orig|escape}</span>
23 <input type="hidden" name="new" value="true"/>
26 <fieldset class="cssform">
27 <legend class="ui-state-active ui-corner-top">{_T string="Translation of '%s' label" pattern="/%s/" replace=$text_orig|escape}</legend>
28 {section name="lang" loop=$trans}
30 <label for="text_trans_{$trans[lang].key}" class="bline">{$trans[lang].name}</label>
31 <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}"/>
32 <input type=hidden name="text_orig" value="{$text_orig|escape}"/>
37 <div class="button-container">
38 <button type="submit" name="trans" class="action">
39 <i class="fas fa-save fa-fw"></i> {_T string="Save"}
41 {include file="forms_types/csrf.tpl"}
45 <p>{_T string="No fields to translate."}</p>
49 {block name="javascripts"}
50 {if isset($trans) && $trans|@count > 0}
52 <script type="text/javascript">
53 $('#text_orig').change(function(e) {
55 var _selected = $('#text_orig option:selected').val();
56 var _form = $('#select_orig');
57 _form.attr('action', _form.attr('action') + '/' + _selected)
58 $('#select_orig').submit();