diff --git a/tailbone/templates/shifts/schedule_edit.mako b/tailbone/templates/shifts/schedule_edit.mako index 6bff3d11..04cf7af4 100644 --- a/tailbone/templates/shifts/schedule_edit.mako +++ b/tailbone/templates/shifts/schedule_edit.mako @@ -8,6 +8,7 @@ $(function() { + % if allow_clear: $('.clear-schedule').click(function() { if (confirm("This will remove all shifts from the schedule you're " + "currently viewing.\n\nAre you sure you wish to do this?")) { @@ -16,6 +17,7 @@ $('#clear-schedule-form').submit(); } }); + % endif $('#copy-week').datepicker({ dateFormat: 'mm/dd/yy' @@ -88,7 +90,9 @@
+ % if allow_clear: + % endif
@@ -98,10 +102,12 @@ ${self.timesheet_wrapper(with_edit_form=True)} ${edit_tools()} +% if allow_clear: ${h.form(url('schedule.edit'), id="clear-schedule-form")} ${h.csrf_token(request)} ${h.hidden('clear-schedule', value='clear')} ${h.end_form()} +% endif