ui: datastore add: set default schedule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-11 07:49:01 +01:00
parent be1d6cbcc6
commit 03e40aa4ee
2 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,6 @@ Ext.define('PBS.form.CalendarEvent', {
return data;
},
store: {
type: 'calendarEventExamples',
},

View File

@ -100,6 +100,7 @@ Ext.define('PBS.DataStoreEdit', {
}
me.url = name ? baseurl + '/' + name : baseurl;
me.method = name ? 'PUT' : 'POST';
me.scheduleValue = name ? null : 'daily';
me.autoLoad = !!name;
return {};
},
@ -146,15 +147,18 @@ Ext.define('PBS.DataStoreEdit', {
emptyText: gettext('none'),
cbind: {
deleteEmpty: '{!isCreate}',
value: '{scheduleValue}',
},
},
{
xtype: 'pbsCalendarEvent',
name: 'prune-schedule',
fieldLabel: gettext("Prune Schedule"),
value: 'daily',
emptyText: gettext('none'),
cbind: {
deleteEmpty: '{!isCreate}',
value: '{scheduleValue}',
},
},
],