diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b798c71757..694e032c6f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2014-06-12 Sergio Martin + + * godmode/massive/massive_copy_modules.php: Delete the + source agent from the target agents lists in massive + copy form to avoid errors for ticket: #869 + 2014-06-11 Sergio Martin * include/functions.php: Change incorrect color assigned to diff --git a/pandora_console/godmode/massive/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php index 7ee5130484..4b3131793b 100644 --- a/pandora_console/godmode/massive/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -252,10 +252,9 @@ $(document).ready (function () { }, loading: "#destiny_agent_loading", callbackPost: function (id, value, option) { - if ($("#source_id_agent").fieldValue ().in_array (id)) { - /* Hide source agent */ - $(option).hide (); - } + /* Hide source agent */ + var selected_agent = $("#source_id_agent").val(); + $("#destiny_id_agent option[value='" + selected_agent + "']").remove(); } }); @@ -374,6 +373,8 @@ $(document).ready (function () { }, "json" ); + // Refresh selectable agents to delete the selected one + $("#destiny_id_group").trigger("change"); }, "json" );