1 {% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
4 {% if trans is defined and trans|length > 0 %}
5 {% if exists and mode != 'ajax' %}
6 <div class="ui top attached accordion-styled header">
7 {{ _T("Choose label to translate") }}
9 <div class="ui bottom attached accordion-styled segment">
10 <form action="{{ url_for('dynamicTranslations') }}" method="get" enctype="multipart/form-data" id="select_orig" class="ui form">
11 <div class="inline field">
12 <div class="ui dropdown selection autosubmit">
13 <input type="hidden" name="text_orig" value="{{ text_orig }}">
14 <i class="dropdown icon"></i>
15 <div class="text">{{ text_orig }}</div>
17 {% for value in orig %}
18 <div class="item{% if value == text_orig %} active selected {% endif %}" data-value="{{ value }}">{{ value }}</div>
22 {% include "components/forms/csrf.html.twig" %}
28 <form action="{{ url_for('editDynamicTranslation') }}" method="post" enctype="multipart/form-data" class="ui equal width form">
31 <label>{{ _T("Original text: '%s'")|replace({'%s': text_orig|escape}) }}</label>
32 <input type="hidden" name="new" value="true"/>
35 <div class="ui top attached accordion-styled header">
36 {{ _T("Translation of '%s' label")|replace({'%s': text_orig}) }}
38 <div class="ui bottom attached accordion-styled segment">
39 <div class="active content field">
40 <table class="ui striped table">
41 {% for k, text in trans %}
43 <td class="three wide"><label for="text_trans_{{ text.key }}">{{ text.name }}</label></td>
44 <td class="thirteen wide">
45 <input type="text" name="text_trans_{{ text.key }}" id="text_trans_{{ text.key }}" value="{% if text.text %}{{ text.text|escape }}{% endif %}"/>
50 <input type=hidden name="text_orig" value="{{ text_orig|escape }}"/>
53 {% if mode != 'ajax' %}
54 <div class="ui basic center aligned segment">
55 <button type="submit" name="trans" class="ui labeled icon primary button action">
56 <i class="save icon" aria-hidden="true"></i> {{ _T("Save") }}
60 <input type="hidden" name="trans" id="trans" value="true"/>
61 <input type="hidden" name="redirect_uri" id="redirect_uri" value=""/>
63 {% include "components/forms/csrf.html.twig" %}
66 <p>{{ _T("No fields to translate.") }}</p>