fix #3245: only use default schedule for new jobs

an empty schedule means 'none', so do not fill it with the default
in case we edit an existing job (like we do already for sync jobs)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-01-12 10:21:17 +01:00 committed by Dietmar Maurer
parent a484c9cf96
commit e422beec74

View File

@ -23,6 +23,7 @@ Ext.define('PBS.window.VerifyJobEdit', {
me.isCreate = !id; me.isCreate = !id;
me.url = id ? `${baseurl}/${id}` : baseurl; me.url = id ? `${baseurl}/${id}` : baseurl;
me.method = id ? 'PUT' : 'POST'; me.method = id ? 'PUT' : 'POST';
me.scheduleValue = id ? null : 'daily';
me.autoLoad = !!id; me.autoLoad = !!id;
me.editDatastore = me.datastore === undefined && me.isCreate; me.editDatastore = me.datastore === undefined && me.isCreate;
return { }; return { };
@ -64,8 +65,8 @@ Ext.define('PBS.window.VerifyJobEdit', {
name: 'schedule', name: 'schedule',
fieldLabel: gettext('Schedule'), fieldLabel: gettext('Schedule'),
emptyText: gettext('none (disabled)'), emptyText: gettext('none (disabled)'),
value: 'daily',
cbind: { cbind: {
value: '{scheduleValue}',
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
}, },