From ffda6da374e5e21d5e45823d77e7db45b1b95a61 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 12 Dec 2023 11:04:30 +0000 Subject: [PATCH] [FIX] web_widget_numeric_step: disable buttons on readonly fields Before this patch, if a field was readonly, the user could still use the +/- buttons to alter its value. Not good! @moduon MT-4396 --- web_widget_numeric_step/static/src/xml/numeric_step.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web_widget_numeric_step/static/src/xml/numeric_step.xml b/web_widget_numeric_step/static/src/xml/numeric_step.xml index de2c313fc..be8ebde7c 100644 --- a/web_widget_numeric_step/static/src/xml/numeric_step.xml +++ b/web_widget_numeric_step/static/src/xml/numeric_step.xml @@ -18,6 +18,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). title="Minus" type="button" data-mode="minus" + t-att-disabled="props.readonly" t-on-click="_onStepClick" /> @@ -39,6 +40,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). title="Plus" type="button" data-mode="plus" + t-att-disabled="props.readonly" t-on-click="_onStepClick" />