diff --git a/tailbone/templates/shifts/schedule_edit.mako b/tailbone/templates/shifts/schedule_edit.mako index cd78e8bb..4fd67c9c 100644 --- a/tailbone/templates/shifts/schedule_edit.mako +++ b/tailbone/templates/shifts/schedule_edit.mako @@ -190,6 +190,15 @@ location.href = '${url('schedule.edit')}'; }); + $('.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?")) { + $(this).button('disable').button('option', 'label', "Clearing..."); + okay_to_leave = true; + $('#clear-schedule-form').submit(); + } + }); + });