diff options
Diffstat (limited to 'modules-available/exams/templates')
-rw-r--r-- | modules-available/exams/templates/page-edit-exam.html | 61 | ||||
-rw-r--r-- | modules-available/exams/templates/page-exams.html | 33 |
2 files changed, 83 insertions, 11 deletions
diff --git a/modules-available/exams/templates/page-edit-exam.html b/modules-available/exams/templates/page-edit-exam.html new file mode 100644 index 00000000..61848ec2 --- /dev/null +++ b/modules-available/exams/templates/page-edit-exam.html @@ -0,0 +1,61 @@ +<h1>{{lang_editExam}}: </h1> + +<form class="form" method="POST" action="?do=exams&action=edit&examid={{exam.examid}}"> + <div class="form-group"> + <label for="locations">{{lang_location}}</label> + <select id="locations" multiple="multiple" name="locations[]" class=""> + {{#locations}} + <option value="{{locationid}}" {{#selected}}selected{{/selected}} > {{locationname}} </option> + {{/locations}} + </select> + </div> + + <div class="row"> + <div class="form-group col-xs-6"> + <label for="starttime_date">{{lang_begin_date}}</label> + <input required class="form-control datepicker" name="starttime_date" value="{{exam.starttime_date}}"/> + </div> + <div class="form-group col-xs-6"> + <label for="starttime_time">{{lang_begin_time}}</label> + <input required type="text" class="form-control timepicker" name="starttime_time" value="{{exam.starttime_time}}" /> + </div> + </div> + + <div class="row"> + <div class="form-group col-xs-6"> + <label for="endtime_date">{{lang_end_date}}</label> + <input required class="form-control datepicker" name="endtime_date" value="{{exam.endtime_date}}"/> + </div> + <div class="form-group col-xs-6"> + <label for="endtime_time">{{lang_end_time}}</label> + <input required type="texxt" class="form-control timepicker" name="endtime_time" value="{{exam.endtime_time}}"/> + </div> + </div> + <div class="row"> + <div class="form-group col-xs-12"> + <label for="description">{{lang_description}}</label> + <textarea class="form-control" type="textarea" name="description">{{exam.description}}</textarea> + </div> + </div> + + <input type="hidden" name="token" value="{{token}}" /> + <input type="submit" class="btn btn-success" value="{{lang_saveExam}}"></input> +</form> + +<script type="application/javascript"><!-- +document.addEventListener("DOMContentLoaded", function () { + var dateSettings = { + format: 'yyyy-mm-dd', + weekStart: 1, + startDate: 'today', + }; + var timeSettings = { + showSeconds: false, + showMeridian: false + }; + $('.datepicker').datepicker(dateSettings); + $('.timepicker').timepicker(timeSettings); + + $('#locations').multiselect({numberDisplayed: 1}); +}, false); +// --></script> diff --git a/modules-available/exams/templates/page-exams.html b/modules-available/exams/templates/page-exams.html index 0cc4cb8a..0dcedb84 100644 --- a/modules-available/exams/templates/page-exams.html +++ b/modules-available/exams/templates/page-exams.html @@ -17,11 +17,18 @@ <td>{{starttime}}</td> <td>{{endtime}}</td> <td> - <form method="POST" action="?do=exams&action=delete" onsubmit="return confirm('{{lang_deleteConfirmation}}');"> - <input type="hidden" name="token" value="{{token}}"/> - <input type="hidden" name="examid" value="{{examid}}"/> - <input type="submit" value="{{lang_delete}}" class="btn btn-default btn-sm" /> - </form> + <div class="btn-toolbar" role="toolbar"> + <div class="btn-group"> + <a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm" >{{lang_edit}}</a> + </div> + <div class="btn-group"> + <form method="POST" action="?do=exams&action=delete" onsubmit="return confirm('{{lang_deleteConfirmation}}');"> + <input type="hidden" name="token" value="{{token}}"/> + <input type="hidden" name="examid" value="{{examid}}"/> + <input type="submit" value="{{lang_delete}}" class="btn btn-default btn-sm" /> + </form> + </div> + </div> </td> </tr> {{/exams}} @@ -48,18 +55,22 @@ function customOrder(a, b) { document.addEventListener("DOMContentLoaded", function () { var container = document.getElementById('timeline'); - var groups_plain = JSON.parse('{{{rooms_json}}}'); - var items_plain = JSON.parse('{{{exams_json}}}'); + var groups_plain = {{{rooms_json}}}; + var items_plain = {{{exams_json}}}; console.log(groups_plain); console.log(items_plain); var groups = new vis.DataSet(groups_plain); var items = new vis.DataSet(items_plain); var options = { - 'start' : '{{{vis_begin}}}', - 'end' : '{{{vis_end}}}', - 'stack' : false, - 'order' : customOrder + 'start' : {{vis_begin}}, + 'end' : {{vis_end}}, + 'stack' : false, + 'editable' : false, + 'min' : {{vis_begin}}, + 'max' : {{vis_max_date}}, + 'order' : customOrder, + 'moment' : function(date) { return vis.moment(date).utc(); } }; var timeline = new vis.Timeline(container, items, groups, options); |