Only change the group to all grupo if neccesary when command is changed

This commit is contained in:
fermin831 2018-10-22 16:26:58 +02:00
parent f537dbb961
commit d8a7ebea08
1 changed files with 4 additions and 2 deletions

View File

@ -284,14 +284,16 @@ $(document).ready (function () {
// Change the selected group
$("#group option").each(function(index, value) {
var current_group = $(value).val()
var current_group = $(value).val();
if (data.id_group != 0 && current_group != 0 && current_group != data.id_group) {
$(value).hide();
} else {
$(value).show();
}
});
if (data.id_group != 0 && $("#group").val() != data.id_group) {
$("#group").val(0);
}
for (i = 1; i <= max_fields; i++) {
var old_value = '';