summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-04-27 14:43:45 +0200
committerSimon Rettberg2018-04-27 14:43:45 +0200
commitc250411257a2037520cb0075f4ddc9d80edb50f3 (patch)
tree16d7a3724b9fb5fd1db8311cdba30f5895084f15
parent[dozmod] Make label activate checkboxes (diff)
downloadslx-admin-c250411257a2037520cb0075f4ddc9d80edb50f3.tar.gz
slx-admin-c250411257a2037520cb0075f4ddc9d80edb50f3.tar.xz
slx-admin-c250411257a2037520cb0075f4ddc9d80edb50f3.zip
[dozmod] Open mail templates with missing placeholders on save
-rw-r--r--modules-available/dozmod/lang/en/template-tags.json2
-rw-r--r--modules-available/dozmod/templates/templates.html7
2 files changed, 5 insertions, 4 deletions
diff --git a/modules-available/dozmod/lang/en/template-tags.json b/modules-available/dozmod/lang/en/template-tags.json
index 329f7260..3ee95e8c 100644
--- a/modules-available/dozmod/lang/en/template-tags.json
+++ b/modules-available/dozmod/lang/en/template-tags.json
@@ -27,7 +27,7 @@
"lang_event": "Event",
"lang_fileSize": "File size",
"lang_followingPlaceholdersUnused": "The following placeholders are not being used",
- "lang_hasNewer": "Newer version exists",
+ "lang_hasNewer": "newer version exists",
"lang_hash": "Hash",
"lang_heading": "Images Marked for Deletion",
"lang_host": "Host",
diff --git a/modules-available/dozmod/templates/templates.html b/modules-available/dozmod/templates/templates.html
index 3ee0ccbc..721de375 100644
--- a/modules-available/dozmod/templates/templates.html
+++ b/modules-available/dozmod/templates/templates.html
@@ -8,7 +8,7 @@
<p><i>{{lang_templatePageDescription}}</i></p>
- <form id="templateForm" role="form" method="POST" action="?do=dozmod&amp;section=templates">
+ <form id="templateForm" role="form" method="POST" action="?do=dozmod&amp;section=templates" onsubmit="return validateForm()">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="save">
@@ -80,7 +80,7 @@
{{/templates}}
</div>
- <button {{^allowedSave}}disabled{{/allowedSave}} type="submit" onclick="return validateForm()" class="btn btn-primary pull-right"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
+ <button {{^allowedSave}}disabled{{/allowedSave}} type="submit" class="btn btn-primary pull-right"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
</form>
<form method="POST" action="?do=dozmod&amp;section=templates">
<input type="hidden" name="token" value="{{token}}">
@@ -138,7 +138,7 @@ function validateForm() {
var missing = [];
mandatory.forEach(function (v,i) {
- if (value.indexOf("%" + v + "%") == -1) {
+ if (value.indexOf("%" + v + "%") === -1) {
missing.push(v);
}
});
@@ -155,6 +155,7 @@ function validateForm() {
if ($toppest === false || $toppest.offset().top > $frame.offset().top) {
$toppest = $frame;
}
+ $('#panel_' + setting).collapse('show');
/* overall result */
ok = false;
} else {