diff options
Diffstat (limited to 'templates/web/base')
-rw-r--r-- | templates/web/base/admin/_translations.html | 19 | ||||
-rw-r--r-- | templates/web/base/admin/body-form.html | 2 | ||||
-rw-r--r-- | templates/web/base/admin/body.html | 5 | ||||
-rw-r--r-- | templates/web/base/admin/contact-form.html | 2 |
4 files changed, 26 insertions, 2 deletions
diff --git a/templates/web/base/admin/_translations.html b/templates/web/base/admin/_translations.html new file mode 100644 index 000000000..d2e0ba322 --- /dev/null +++ b/templates/web/base/admin/_translations.html @@ -0,0 +1,19 @@ +[% IF languages.size > 1 %] +<h2>[% loc('Translations') %]</h2> + <input type="hidden" name="token" value="[% csrf_token %]" > +<table> + <tr> + <th>[% loc('Language') %]</th> + <th>[% loc('Translation') %]</th> + </tr> + [% FOREACH language IN languages.keys %] + <tr> + <td> + <label for="translation_[% language %]">[% languages.$language.name %] ([% language %])</label> + <input type="hidden" name="translation_id_[% language %]" value="[% translations.$language.id %]"> + </td> + <td><input type="text" name="translation_[% language %]" id="translation_[% language %]" value="[% translations.$language.msgstr %]"></td> + </tr> + [% END %] +</table> +[% END %] diff --git a/templates/web/base/admin/body-form.html b/templates/web/base/admin/body-form.html index 6c750bcaf..55d0e500c 100644 --- a/templates/web/base/admin/body-form.html +++ b/templates/web/base/admin/body-form.html @@ -25,6 +25,8 @@ <input type="text" class="form-control" name="name" id="name" value="[% body.name | html %]" size="50"> </p> + [% INCLUDE 'admin/_translations.html' %] + <div class="admin-hint"> <p> [% loc( diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html index 47dce4a9c..7fa446f44 100644 --- a/templates/web/base/admin/body.html +++ b/templates/web/base/admin/body.html @@ -130,9 +130,10 @@ <div class="fms-admin-warning"> [% errors.values.join('<br>') %] </div> + [% INCLUDE 'admin/contact-form.html' translations=contact_translations %] + [% ELSE %] + [% INCLUDE 'admin/contact-form.html' translations={} %] [% END %] - - [% INCLUDE 'admin/contact-form.html' %] </div> [% IF NOT errors and c.user.is_superuser %] diff --git a/templates/web/base/admin/contact-form.html b/templates/web/base/admin/contact-form.html index cd35743ad..375b3eb99 100644 --- a/templates/web/base/admin/contact-form.html +++ b/templates/web/base/admin/contact-form.html @@ -20,6 +20,8 @@ </p> [% END %] + [% INCLUDE 'admin/_translations.html' %] + <div class="admin-hint"> <p> [% loc("The <strong>email address</strong> is the destination to which reports about this category will be sent. |