blob: 2484ddc8d2eecbcb8027878d2b173fc30c763089 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<div>
<form method="post" action="?do=locationinfo" id="timeForm">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="updateOpeningTime">
<input type="hidden" name="id" value="{{id}}">
<table class="table table-condensed locations" style="margin-bottom:0px">
<tr>
<th>{{lang_day}}</th>
<th>{{lang_openingTime}}</th>
<th>{{lang_closingTime}}</th>
<th>{{lang_delete}}</th>
</tr>
{{#openingtimes}}
<tr class=tablerow>
<td>{{days}}</td>
<td>{{openingtime}}</td>
<td>{{closingtime}}</td>
<td align="center"><input type="checkbox" name="delete[]" value="{{index}}"</td>
<!--<td><button class="btn btn-sm btn-danger">X</button></td>-->
</tr>
{{/openingtimes}}
<tr id="lastOpenTimesTableElement"></tr>
</table>
<br>
<a class="btn btn-success btn-sm" onclick=newOpeningTime()><span class="glyphicon glyphicon-plus-sign"></span> {{lang_openingTime}}</a>
<!--<a class="btn btn-danger btn-sm" onclick=>{{lang_deleteAll}}</a>-->
<br>
<br>
<button type="submit" class="btn btn-primary">{{lang_save}}</button>
</form>
</div>
<script>
function newOpeningTime() {
$('#lastOpenTimesTableElement').before('<tr>\
<td>\
<label><input type="checkbox" name="days[]" value="Monday">{{lang_shortMonday}}</label>\
<label><input type="checkbox" name="days[]" value="Tuesday">{{lang_shortTuesday}}</label>\
<label><input type="checkbox" name="days[]" value="Wednesday">{{lang_shortWednesday}}</label>\
<label><input type="checkbox" name="days[]" value="Thursday">{{lang_shortThursday}}</label>\
<label><input type="checkbox" name="days[]" value="Friday">{{lang_shortFriday}}</label>\
<label><input type="checkbox" name="days[]" value="Saturday">{{lang_shortSaturday}}</label>\
<label><input type="checkbox" name="days[]" value="Sunday">{{lang_shortSunday}}</label>\
<input type="hidden" name="days[]" value="-">\
</td>\
<td>\
<input type="time" name="openingtime[]">\
</td>\
<td>\
<input type="time" name="closingtime[]">\
</td>\
<td align="center">\
<input type="checkbox" name="dontadd[]" value="dontadd"\
</td>\
</tr>');
}
// <!--<button type="submit" class="btn btn-success btn-sm" onclick=>✓</button>-->\
</script>
|