Merge branch 'ent-3382-comprobacion-de-grupos-secundarios-y-primarios-al-creareditar-un-agente' into 'develop'

Added advice when a primary group will be selected when is currentl a secondary group

See merge request artica/pandorafms!2353
This commit is contained in:
Daniel Rodriguez 2019-07-15 13:59:29 +02:00
commit 6765544b66
1 changed files with 13 additions and 0 deletions

View File

@ -1162,6 +1162,19 @@ ui_require_jquery_file('bgiframe');
}
$(document).ready (function() {
var previous_primary_group_select;
$("#grupo").on('focus', function () {
previous_primary_group_select = this.value;
}).change(function() {
if ($("#secondary_groups_selected option[value="+$("#grupo").val()+"]").length) {
alert("<?php echo __('Secondary group cannot be primary too.'); ?>");
$("#grupo").val(previous_primary_group_select);
} else {
previous_primary_group_select = this.value;
}
});
$("select#id_os").pandoraSelectOS ();
var checked = $("#checkbox-cascade_protection").is(":checked");