diff options
Diffstat (limited to 'modules-available/dozmod/templates/templates.html')
-rw-r--r-- | modules-available/dozmod/templates/templates.html | 7 |
1 files changed, 4 insertions, 3 deletions
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&section=templates"> + <form id="templateForm" role="form" method="POST" action="?do=dozmod&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&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 { |