fix 'state' default value in resource edit dialog

as we assume the default to 'enabled' when state isn't explicitly
set, use this default when editing a resource.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2015-09-10 09:10:52 +02:00 committed by Dietmar Maurer
parent 588a088bbe
commit 15ac891372

View File

@ -108,9 +108,9 @@ Ext.define('PVE.ha.VMResourceEdit', {
success: function(response, options) {
var values = response.result.data;
values.enable = false;
if (values.state === 'enabled') {
values.enable = true;
values.enable = true;
if (values.state === 'disabled') {
values.enable = false;
}
var regex = /^(\S+):(\S+)$/;