[pbs-devel] [PATCH proxmox-backup v14 19/26] ui: maintenance: fix disable msg field if no type is selected
Dominik Csapak
d.csapak at proxmox.com
Mon Nov 25 14:23:25 CET 2024
one comment inline
On 11/22/24 15:47, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
> www/window/MaintenanceOptions.js | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/www/window/MaintenanceOptions.js b/www/window/MaintenanceOptions.js
> index 1ee92542e..527c36987 100644
> --- a/www/window/MaintenanceOptions.js
> +++ b/www/window/MaintenanceOptions.js
> @@ -56,12 +56,17 @@ Ext.define('PBS.window.MaintenanceOptions', {
> fieldLabel: gettext('Maintenance Type'),
> value: '__default__',
> deleteEmpty: true,
> + listeners: {
> + change: (field, newValue) => {
> + Ext.getCmp('message-field').setDisabled(newValue === '__default__');
i'd rather you use 'itemId' instead and use our 'up().down()' mechanism like we do everywhere else,
or use a 'referenceHolder' and 'reference'+'lookup' instead
the reason is that (html) id's have to be globally unique, and having one that is
generically named 'message-field' might clash with something else at one point...
> + },
> + },
> },
> {
> xtype: 'proxmoxtextfield',
> + id: 'message-field',
> name: 'maintenance-msg',
> fieldLabel: gettext('Description'),
> - // FIXME: disable if maintenance type is none
> },
> ],
> },
More information about the pbs-devel
mailing list