From a5f838d56a34290acd682e6e082e8a60794e2a25 Mon Sep 17 00:00:00 2001 From: msquare Date: Mon, 19 Aug 2019 22:04:52 +0200 Subject: fix back button on shift create preview --- includes/pages/admin_shifts.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'includes/pages/admin_shifts.php') diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index 30ea4773..c62ff995 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -129,7 +129,8 @@ function admin_shifts() $valid = false; error(__('Please split the shift-change hours by colons.')); } - $shift_over_midnight = $request->has('shift_over_midnight'); + $shift_over_midnight = $request->has('shift_over_midnight') + && $request->input('shift_over_midnight') != 'false'; } } else { $valid = false; @@ -328,13 +329,14 @@ function admin_shifts() form_hidden('length', $length), form_hidden('change_hours', implode(', ', $change_hours)), form_hidden('angelmode', $angelmode), - form_submit('back', __('back')), + form_hidden('shift_over_midnight', $shift_over_midnight ? 'true' : 'false'), + form_submit('back', glyph('menu-left') . __('back')), table([ 'timeslot' => __('Time and location'), 'title' => __('Type and title'), 'needed_angels' => __('Needed angels') ], $shifts_table), - form_submit('submit', __('Save')) + form_submit('submit', glyph('floppy-disk') . __('Save')) ]) ]); } @@ -437,7 +439,7 @@ function admin_shifts() 'change_hours', __('Shift change hours'), $request->has('change_hours') - ? $request->input('input') + ? $request->input('change_hours') : '00, 04, 08, 10, 12, 14, 16, 18, 20, 22' ), form_checkbox( @@ -465,7 +467,7 @@ function admin_shifts() ]) ]) ]), - form_submit('preview', __('Preview')) + form_submit('preview', glyph('search') . __('Preview')) ]) ]); } -- cgit v1.2.3-54-g00ecf