summaryrefslogtreecommitdiffstats
path: root/modules-available/translation
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-21 11:21:43 +0100
committerSimon Rettberg2018-03-21 11:21:43 +0100
commitf43d7611f7b35d8052c329ecbc944e9370b600de (patch)
tree8d2822403a8330762b38d1981fca511b347df6d4 /modules-available/translation
parent[inc/*] Suppress warning, don't close statements (diff)
downloadslx-admin-f43d7611f7b35d8052c329ecbc944e9370b600de.tar.gz
slx-admin-f43d7611f7b35d8052c329ecbc944e9370b600de.tar.xz
slx-admin-f43d7611f7b35d8052c329ecbc944e9370b600de.zip
[translation] Fix saving of multiline texts
Diffstat (limited to 'modules-available/translation')
-rw-r--r--modules-available/translation/page.inc.php1
-rw-r--r--modules-available/translation/templates/edit.html4
2 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/translation/page.inc.php b/modules-available/translation/page.inc.php
index df7bc15e..bd5d440e 100644
--- a/modules-available/translation/page.inc.php
+++ b/modules-available/translation/page.inc.php
@@ -999,6 +999,7 @@ class Page_Translation extends Page
//find the tag requests to change the file
$tags = Request::post('langtag', array(), 'array');
foreach ($tags as $tag => $value) {
+ error_log($tag . '=' . $value);
$tag = trim($tag);
if (empty($tag)) {
Message::addWarning('i18n-empty-tag');
diff --git a/modules-available/translation/templates/edit.html b/modules-available/translation/templates/edit.html
index 15e69f3b..5b957067 100644
--- a/modules-available/translation/templates/edit.html
+++ b/modules-available/translation/templates/edit.html
@@ -38,7 +38,7 @@
<input type="text" class="form-control switchable {{#missing}}txt-empty{{/missing}}" value="{{translation}}" ondblclick="slxMb(this)" name="langtag[{{tag}}]" placeholder="{{placeholder}}">
{{/big}}
{{#big}}
- <textarea rows="3" class="form-control {{#missing}}txt-empty{{/missing}}" name="lang#!#{{tag}}" placeholder="{{placeholder}}">{{translation}}</textarea>
+ <textarea rows="3" class="form-control {{#missing}}txt-empty{{/missing}}" name="langtag[{{tag}}]" placeholder="{{placeholder}}">{{translation}}</textarea>
{{/big}}
</td>
@@ -81,7 +81,7 @@
var slxNewTagCounter = 0;
function slxAddTag()
{
- $('#moduleTable tr:last').after(
+ $('#moduleTable').find('tr:last').after(
'<tr id="new-delete-' + slxNewTagCounter + '">' +
' <td class="col-sm-3">' +
' <input type="text" name="new-id[' + slxNewTagCounter + ']" class="form-control">' +