diff --git a/pandora_console/godmode/setup/setup_notifications.php b/pandora_console/godmode/setup/setup_notifications.php
index d3c846aebf..06e6a85b63 100644
--- a/pandora_console/godmode/setup/setup_notifications.php
+++ b/pandora_console/godmode/setup/setup_notifications.php
@@ -75,3 +75,23 @@ html_print_input_hidden('update_config', 1);
html_print_table($table_content);
echo '';
+?>
+
diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php
index 921b5c55e1..24013b92fd 100644
--- a/pandora_console/include/functions_notifications.php
+++ b/pandora_console/include/functions_notifications.php
@@ -299,8 +299,8 @@ function notifications_print_global_source_configuration($source) {
// Generate the html for title
$html_selectors = "
";
- $html_selectors .= notifications_print_source_select_box(notifications_get_user_sources_for_select($source['id']), 'users', $is_group_all);
- $html_selectors .= notifications_print_source_select_box($source_groups, 'groups', $is_group_all);
+ $html_selectors .= notifications_print_source_select_box(notifications_get_user_sources_for_select($source['id']), 'users', $id, $is_group_all);
+ $html_selectors .= notifications_print_source_select_box($source_groups, 'groups', $id, $is_group_all);
$html_selectors .= "
";
// Generate the checkboxes and time select
@@ -346,11 +346,12 @@ function notifications_print_global_source_configuration($source) {
*
* @param array $info_selec All info required for build the selector
* @param string $id users|groups
+ * @param string $source_id Id of source
* @param bool $disabled Disable the selectors
*
* @return string HTML with the generated selector
*/
-function notifications_print_source_select_box($info_selec, $id, $disabled) {
+function notifications_print_source_select_box($info_selec, $id, $source_id, $disabled) {
$title = $id == "users" ? __('Notified users') : __('Notified groups');
$add_title = $id == "users" ? __('Add users') : __('Add groups');
@@ -361,7 +362,7 @@ function notifications_print_source_select_box($info_selec, $id, $disabled) {
$html_select .= " ";
$html_select .= "
$title
";
// Put a true if empty sources to avoid to sow the 'None' value
- $html_select .= html_print_select(empty($info_selec) ? true : $info_selec, "multi-{$id}[]", 0, false, '', '', true, true, true,'', $disabled);
+ $html_select .= html_print_select(empty($info_selec) ? true : $info_selec, "multi-{$id}-{$source_id}[]", 0, false, '', '', true, true, true,'', $disabled);
$html_select .= " ";
$html_select .= " ";
$html_select .= html_print_image('images/input_add.png', true, array('title' => $add_title));