From 5f2793f75c8a124cddec95f5ca0f1603aa43a259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 14 Nov 2023 15:23:36 +0100 Subject: [PATCH] Hide URL button when the field is empty The disabled attribute does not prevent the user to click on the empty link. Closes #12747 --- sao/src/view/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sao/src/view/form.js b/sao/src/view/form.js index 6033d24519..4e50b5f340 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -4588,7 +4588,7 @@ function eval_pyson(value){ }, set_url: function(value) { this.button.attr('href', value); - this.button.prop('disabled', !value); + this.button.toggle(value); }, set_invisible: function(invisible) { Sao.View.Form.URL._super.set_invisible.call(this, invisible);