Fix inventory blacklist open

This commit is contained in:
Calvo 2022-12-29 18:14:43 +01:00
parent fc7187ed0c
commit 867749f9d3
2 changed files with 11 additions and 5 deletions

View File

@ -949,5 +949,11 @@ $(document).ready (function () {
}
});
});
$("#submit-update_button").click(function () {
$('#inventory_changes_blacklist option').map(function(){
$(this).prop('selected', true);
});
});
});
</script>

View File

@ -395,6 +395,11 @@ function config_update_config()
if (config_update_value('email_password', io_input_password(get_parameter('email_password')), true) === false) {
$error_update[] = __('Email password');
}
$inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []);
if (config_update_value('inventory_changes_blacklist', implode(',', $inventory_changes_blacklist), true) === false) {
$error_update[] = __('Inventory changes blacklist');
}
break;
case 'enterprise':
@ -458,11 +463,6 @@ function config_update_config()
if (config_update_value('sap_license', get_parameter('sap_license'), true) === false) {
$error_update[] = __('SAP/R3 Plugin Licence');
}
$inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []);
if (config_update_value('inventory_changes_blacklist', implode(',', $inventory_changes_blacklist), true) === false) {
$error_update[] = __('Inventory changes blacklist');
}
}
break;