diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-05-27 15:37:49 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-05-27 15:37:49 +0000 |
| commit | a0dd66e71949fc78f6ea9d88a0d4cd241185f373 (patch) | |
| tree | 7edaf1eac24d9cdc35011e32ff4785395345bb06 /app/controllers/calendar/calendar.php | |
| parent | 0efc30590f18a568ebe021b72da2aa4033e38a78 (diff) | |
set defaultDate on changed calendar dates in sidebar widgets, fixes #3924
Closes #3924
Merge request studip/studip!3046
Diffstat (limited to 'app/controllers/calendar/calendar.php')
| -rw-r--r-- | app/controllers/calendar/calendar.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/calendar/calendar.php b/app/controllers/calendar/calendar.php index fa33e2e..0cb96ad 100644 --- a/app/controllers/calendar/calendar.php +++ b/app/controllers/calendar/calendar.php @@ -111,6 +111,8 @@ class Calendar_CalendarController extends AuthenticatedController { PageLayout::setTitle(_('Kalender')); + $default_date = \Studip\Calendar\Helper::getDefaultCalendarDate(); + if (Request::isPost()) { //In case the checkbox of the options widget is clicked, the resulting //POST request must be catched here and result in a redirect. @@ -203,6 +205,7 @@ class Calendar_CalendarController extends AuthenticatedController if ($calendar_owner && $calendar_owner->id === User::findCurrent()->id) { //The user is viewing their own calendar. $options = new OptionsWidget(); + $options->addLayoutCSSClass('calendar-action'); $options->addCheckbox( _('Abgelehnte Termine anzeigen'), Request::bool('show_declined'), @@ -237,6 +240,7 @@ class Calendar_CalendarController extends AuthenticatedController $this->url_for('calendar/calendar/index', ['view' => 'group']), 'group_id' ); + $group_select->addLayoutCSSClass('calendar-action'); $options = [ '' => _('(bitte wählen)') ]; @@ -263,6 +267,7 @@ class Calendar_CalendarController extends AuthenticatedController $this->url_for('calendar/calendar'), 'user_id' ); + $calendar_select->addLayoutCSSClass('calendar-action'); $select_options = [ '' => _('(bitte wählen)'), User::findCurrent()->id => _('Eigener Kalender') @@ -335,7 +340,6 @@ class Calendar_CalendarController extends AuthenticatedController $slot_durations = $this->getUserCalendarSlotSettings(); //Create the fullcalendar object: - $default_date = \Studip\Calendar\Helper::getDefaultCalendarDate(); $data_url_params = []; if (Request::bool('show_declined')) { |
