diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index d9af328129..d746a6447b 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -3351,9 +3351,11 @@ function html_print_switch($attributes=[]) $attributes['style'] = ''; } + $disabled_class .= (bool) ($attributes['disabled']) ? ' p-slider-disabled' : ''; + return ""; } diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index 66efd3d4a7..45e08dfcf6 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -916,7 +916,7 @@ function notifications_print_two_ways_select($info_selec, $users, $source_id) function notifications_print_user_switch($source, $user, $label) { $status = notifications_get_user_label_status($source, $user, $label); - return html_print_switch( + $switch = html_print_switch( [ 'name' => $label, 'value' => $status['status'], @@ -925,6 +925,13 @@ function notifications_print_user_switch($source, $user, $label) 'id' => 'notifications-user-'.$source['id'].'-label-'.$label, ] ); + + $data = [ + 'disabled' => !$status['enabled'], + 'switch' => $switch, + ]; + + return $data; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index c87b7ec26a..a081452390 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4656,6 +4656,10 @@ div#dialog_messages table th:last-child { border-radius: 34px; } +.p-slider-disabled { + background-color: #dfdfdf !important; +} + .p-slider:before { position: absolute; content: ""; diff --git a/pandora_console/operation/users/user_edit_notifications.php b/pandora_console/operation/users/user_edit_notifications.php index 03df1b9d22..c153b57bd5 100644 --- a/pandora_console/operation/users/user_edit_notifications.php +++ b/pandora_console/operation/users/user_edit_notifications.php @@ -64,7 +64,10 @@ echo '