From f521dec4e20964d9c82cd0cbed1fbc1c953a04c5 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Thu, 4 Nov 2021 10:10:11 +0100 Subject: [PATCH] wip special days alerts --- .../include/class/CalendarManager.class.php | 32 ++++++++++--------- .../views/calendar/special_days_edit.php | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pandora_console/include/class/CalendarManager.class.php b/pandora_console/include/class/CalendarManager.class.php index c857fdea5e..125c4c1c26 100644 --- a/pandora_console/include/class/CalendarManager.class.php +++ b/pandora_console/include/class/CalendarManager.class.php @@ -644,21 +644,23 @@ class CalendarManager ); $tmp->options .= ''; - // Options. Delete. - $tmp->options .= ''; - $tmp->options .= html_print_image( - 'images/cross.png', - true, - [ - 'title' => __('Delete'), - 'class' => 'invert_filter', - ] - ); - $tmp->options .= ''; + if ($tmp->id != 1) { + // Options. Delete. + $tmp->options .= ''; + $tmp->options .= html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ); + $tmp->options .= ''; + } } $carry[] = $tmp; diff --git a/pandora_console/views/calendar/special_days_edit.php b/pandora_console/views/calendar/special_days_edit.php index 9b53e9ae9d..77e53e49cf 100644 --- a/pandora_console/views/calendar/special_days_edit.php +++ b/pandora_console/views/calendar/special_days_edit.php @@ -105,7 +105,7 @@ $inputs[] = [ 'name' => 'day_code', 'type' => 'select', 'fields' => $days, - 'selected' => $specialDay->day_code(), + 'selected' => ($specialDay->day_code() === null) ? 1 : $specialDay->day_code(), ], ];