diff options
author | MichiK <6341204+der-michik@users.noreply.github.com> | 2018-12-08 19:27:44 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-08 21:14:20 +0100 |
commit | 252f003b94464ed38aadfdadc50ec9d333d9ba44 (patch) | |
tree | 06d579c0468ab5fe72595cfc9813790f98171280 /includes | |
parent | f83e754f8491d895502484637db289f7321bfc1a (diff) |
Really fix the data/timepicker CSS and JS
Attaching the timepicker to the input instead of the sorrounding div didn't
turn out as expected. Therefore, I used the same mechanism for DOM attachment
and lazy initialization for the timepicker like for the datepicker.
Instead of trying to load the CSS through webpack and some JS voodoo, it's
a lot simpler to just include it via the normal base theme CSS. This works.
In addition, I noticed that there is an easier way to read the current locale.
No need to do this twice via different ways.
This closes #516.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/pages/user_shifts.php | 4 | ||||
-rw-r--r-- | includes/sys_form.php | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 7156212a..942b8849 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -176,9 +176,6 @@ function view_user_shifts() $days = load_days(); $rooms = load_rooms(); $types = load_types(); - $locale = $session->get('locale'); - $shortLocale = substr($locale, 0, 2); - if (!$session->has('shifts-filter')) { $room_ids = [ @@ -256,7 +253,6 @@ function view_user_shifts() ), ] ), - 'short_locale' => $shortLocale, 'filled_select' => make_select($filled, $shiftsFilter->getFilled(), 'filled', __('Occupancy')), 'task_notice' => '<sup>1</sup>' diff --git a/includes/sys_form.php b/includes/sys_form.php index 43db3455..38e9da4e 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -68,11 +68,9 @@ function form_date($name, $label, $value, $start_date = '', $end_date = '') $value = is_numeric($value) ? date('Y-m-d', $value) : ''; $start_date = is_numeric($start_date) ? date('Y-m-d', $start_date) : ''; $end_date = is_numeric($end_date) ? date('Y-m-d', $end_date) : ''; - $locale = $locale = session()->get('locale'); - $shortLocale = substr($locale, 0, 2); return form_element($label, ' - <div class="input-group date" id="' . $dom_id . '" data-locale="' . $shortLocale . '" data-min-date="' . $start_date . '" data-max-date="' . $end_date . '"> + <div class="input-group date" id="' . $dom_id . '" data-min-date="' . $start_date . '" data-max-date="' . $end_date . '"> <input type="date" placeholder="YYYY-MM-DD" name="' . $name . '" class="form-control" value="' . htmlspecialchars($value) . '">' . '<span class="input-group-addon">' . glyph('th') . '</span> </div> |