Fix bug in base 'shifts' template if weekdays
not in context
This commit is contained in:
parent
afe822dd6c
commit
e6bd9e18d0
|
@ -11,11 +11,13 @@
|
|||
var data_modified = false;
|
||||
var okay_to_leave = true;
|
||||
var previous_selections = {};
|
||||
% if weekdays is not Undefined:
|
||||
var weekdays = [
|
||||
% for i, day in enumerate(weekdays, 1):
|
||||
'${day.strftime('%a %d %b %Y')}'${',' if i < len(weekdays) else ''}
|
||||
% endfor
|
||||
];
|
||||
% endif
|
||||
|
||||
window.onbeforeunload = function() {
|
||||
if (! okay_to_leave) {
|
||||
|
|
Loading…
Reference in a new issue