diff options
author | Simon Rettberg | 2017-04-28 10:34:51 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-28 10:34:51 +0200 |
commit | 66d4e53064429461092a863bb90a02bc96c965b1 (patch) | |
tree | 6d8168bfff2fca0346b41c858da3cfdb31f69afa /modules-available/exams/templates/page-add-edit-exam.html | |
parent | Move rebootcontrol, locationinfo to new beta section, statistics_reporting to... (diff) | |
download | slx-admin-66d4e53064429461092a863bb90a02bc96c965b1.tar.gz slx-admin-66d4e53064429461092a863bb90a02bc96c965b1.tar.xz slx-admin-66d4e53064429461092a863bb90a02bc96c965b1.zip |
[exams] Show confirmation dialog when defining global exam
This fixes #3125
Diffstat (limited to 'modules-available/exams/templates/page-add-edit-exam.html')
-rw-r--r-- | modules-available/exams/templates/page-add-edit-exam.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules-available/exams/templates/page-add-edit-exam.html b/modules-available/exams/templates/page-add-edit-exam.html index 106c6641..bf000df5 100644 --- a/modules-available/exams/templates/page-add-edit-exam.html +++ b/modules-available/exams/templates/page-add-edit-exam.html @@ -110,7 +110,7 @@ <input type="hidden" name="action" value="save"> <input type="hidden" name="token" value="{{token}}"> <input type="hidden" name="examid" value="{{exam.examid}}"> - <button class="btn btn-success">{{lang_save}}</button> + <button class="btn btn-success" type="submit">{{lang_save}}</button> </form> <script type="application/javascript"><!-- @@ -206,5 +206,13 @@ document.addEventListener("DOMContentLoaded", function () { end_time.change(startEndChanged); $('#lecturelist').change(updateLectureInfo); + $('#tolleform').submit(function(ev) { + if ($('#locations option:selected').length === 0 && $('#locations option').length > 1) { + if (!confirm('{{lang_comfirmGlobalExam}}')) { + ev.preventDefault(); + } + } + }); + }, false); // --></script> |