mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-07 08:03:00 +00:00
ui: maintenance: fix disable msg field if no type is selected
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
aaac857282
commit
703a822c97
@ -52,16 +52,22 @@ Ext.define('PBS.window.MaintenanceOptions', {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
xtype: 'pbsMaintenanceType',
|
xtype: 'pbsMaintenanceType',
|
||||||
|
reference: 'type-field',
|
||||||
name: 'maintenance-type',
|
name: 'maintenance-type',
|
||||||
fieldLabel: gettext('Maintenance Type'),
|
fieldLabel: gettext('Maintenance Type'),
|
||||||
value: '__default__',
|
value: '__default__',
|
||||||
deleteEmpty: true,
|
deleteEmpty: true,
|
||||||
|
listeners: {
|
||||||
|
change: (field, newValue) => {
|
||||||
|
field.up('form').down('[name=maintenance-msg]').setDisabled(newValue === '__default__');
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'proxmoxtextfield',
|
xtype: 'proxmoxtextfield',
|
||||||
|
reference: 'message-field',
|
||||||
name: 'maintenance-msg',
|
name: 'maintenance-msg',
|
||||||
fieldLabel: gettext('Description'),
|
fieldLabel: gettext('Description'),
|
||||||
// FIXME: disable if maintenance type is none
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user