Fixed notifications global configuration. Do not disable the multiple selects.

Former-commit-id: c5148e3adad63300c2b938a78eb46974cceff761
This commit is contained in:
fermin831 2019-02-12 15:36:41 +01:00
parent 3c3d9daa09
commit 35ea03ddf6
1 changed files with 15 additions and 12 deletions

View File

@ -684,8 +684,16 @@ function notifications_print_global_source_configuration($source)
// Generate the html for title. // Generate the html for title.
$html_selectors = "<div class='global-config-notification-selectors'>"; $html_selectors = "<div class='global-config-notification-selectors'>";
$html_selectors .= notifications_print_source_select_box(notifications_get_user_sources_for_select($source['id']), 'users', $source['id'], $is_group_all); $html_selectors .= notifications_print_source_select_box(
$html_selectors .= notifications_print_source_select_box($source_groups, 'groups', $source['id'], $is_group_all); notifications_get_user_sources_for_select($source['id']),
'users',
$source['id']
);
$html_selectors .= notifications_print_source_select_box(
$source_groups,
'groups',
$source['id']
);
$html_selectors .= '</div>'; $html_selectors .= '</div>';
// Generate the checkboxes and time select. // Generate the checkboxes and time select.
$html_checkboxes = "<div class='global-config-notification-checkboxes'>"; $html_checkboxes = "<div class='global-config-notification-checkboxes'>";
@ -736,15 +744,13 @@ function notifications_print_global_source_configuration($source)
* @param array $info_selec All info required for build the selector. * @param array $info_selec All info required for build the selector.
* @param string $id One of users|groups. * @param string $id One of users|groups.
* @param string $source_id Id of source. * @param string $source_id Id of source.
* @param boolean $disabled Disable the selectors.
* *
* @return string HTML with the generated selector * @return string HTML with the generated selector
*/ */
function notifications_print_source_select_box( function notifications_print_source_select_box(
$info_selec, $info_selec,
$id, $id,
$source_id, $source_id
$disabled
) { ) {
$title = ($id === 'users') ? __('Notified users') : __('Notified groups'); $title = ($id === 'users') ? __('Notified users') : __('Notified groups');
$add_title = ($id === 'users') ? __('Add users') : __('Add groups'); $add_title = ($id === 'users') ? __('Add users') : __('Add groups');
@ -774,10 +780,7 @@ function notifications_print_source_select_box(
'', '',
'', '',
true, true,
true, true
true,
'',
$disabled
), ),
html_print_image( html_print_image(
'images/input_add.png', 'images/input_add.png',