';
$sources = notifications_get_all_sources();
$disabled_flag = false;
foreach ($sources as $source) {
echo '
';
$table_content = [
$source['description'],
notifications_print_user_switch($source, $id, 'enabled'),
notifications_print_user_switch($source, $id, 'also_mail'),
];
$notifications_enabled = notifications_print_user_switch($source, $id, 'enabled');
$notifications_also_mail = notifications_print_user_switch($source, $id, 'also_mail');
if ($notifications_enabled['disabled'] == 1 || $notifications_also_mail['disabled'] == 1) {
$disabled_flag = true;
}
echo '
'.$source['description'].'
';
echo '
'.$notifications_enabled['switch'].'
';
echo '
'.$notifications_also_mail['switch'].'
';
echo '
';
}
if ((bool) $disabled_flag === true) {
ui_print_warning_message(
__('Controls have been disabled by the system administrator')
);
}
echo '