ui: add calendar event selector
modelled after the PVE one, but we are not 1:1 compatible and need deleteEmpty support. For now let's just have some duplicate code, but we should try to move this to widget toolkit ASAP. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -15,6 +15,9 @@ Ext.define('PBS.DataStoreEdit', {
|
||||
let baseurl = '/api2/extjs/config/datastore';
|
||||
|
||||
me.isCreate = !name;
|
||||
if (!me.isCreate) {
|
||||
me.defaultFocus = 'textfield[name=comment]';
|
||||
}
|
||||
me.url = name ? baseurl + '/' + name : baseurl;
|
||||
me.method = name ? 'PUT' : 'POST';
|
||||
me.autoLoad = !!name;
|
||||
@ -51,17 +54,19 @@ Ext.define('PBS.DataStoreEdit', {
|
||||
],
|
||||
column2: [
|
||||
{
|
||||
xtype: 'proxmoxtextfield',
|
||||
xtype: 'pbsCalendarEvent',
|
||||
name: 'gc-schedule',
|
||||
fieldLabel: gettext("GC Schedule"),
|
||||
emptyText: gettext('none'),
|
||||
cbind: {
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxtextfield',
|
||||
xtype: 'pbsCalendarEvent',
|
||||
name: 'prune-schedule',
|
||||
fieldLabel: gettext("Prune Schedule"),
|
||||
emptyText: gettext('none'),
|
||||
cbind: {
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
|
@ -68,7 +68,7 @@ Ext.define('PBS.window.SyncJobEdit', {
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Schedule'),
|
||||
xtype: 'proxmoxtextfield',
|
||||
xtype: 'pbsCalendarEvent',
|
||||
name: 'schedule',
|
||||
emptyText: gettext('none'),
|
||||
cbind: {
|
||||
|
Reference in New Issue
Block a user