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 | |
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')
-rw-r--r-- | modules-available/exams/lang/de/template-tags.json | 1 | ||||
-rw-r--r-- | modules-available/exams/lang/en/template-tags.json | 1 | ||||
-rw-r--r-- | modules-available/exams/templates/page-add-edit-exam.html | 10 |
3 files changed, 11 insertions, 1 deletions
diff --git a/modules-available/exams/lang/de/template-tags.json b/modules-available/exams/lang/de/template-tags.json index 79d8edea..e011ee20 100644 --- a/modules-available/exams/lang/de/template-tags.json +++ b/modules-available/exams/lang/de/template-tags.json @@ -11,6 +11,7 @@ "lang_begin": "Beginn", "lang_begin_date": "Beginn Datum", "lang_begin_time": "Uhrzeit", + "lang_comfirmGlobalExam": "Wollen Sie wirklich eine globale Pr\u00fcfung definieren? Im gew\u00e4hlten Zeitraum werden s\u00e4mtliche R\u00e4ume in den Pr\u00fcfungsmodus geschaltet.", "lang_deleteConfirmation": "Wirklich l\u00f6schen?", "lang_description": "Beschreibung", "lang_duration": "Dauer", diff --git a/modules-available/exams/lang/en/template-tags.json b/modules-available/exams/lang/en/template-tags.json index 1da4a40a..a4ae9325 100644 --- a/modules-available/exams/lang/en/template-tags.json +++ b/modules-available/exams/lang/en/template-tags.json @@ -11,6 +11,7 @@ "lang_begin": "Begin", "lang_begin_date": "Begin Date", "lang_begin_time": "Time", + "lang_comfirmGlobalExam": "Do you really want to create a global exam? Every single room will be set to lecture mode during the selected time period.", "lang_deleteConfirmation": "Are you sure?", "lang_description": "Description", "lang_duration": "Duration", 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> |