From 0748fba70f4ebb3473f3c30f183001b885ae992a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 13 May 2020 11:56:49 +0200 Subject: [PATCH] Add readonly value to readonly option --- api/js/etemplate/et2_widget_radiobox.js | 3 ++- api/js/etemplate/et2_widget_radiobox.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_radiobox.js b/api/js/etemplate/et2_widget_radiobox.js index 74ff916575..ddb7eb5227 100644 --- a/api/js/etemplate/et2_widget_radiobox.js +++ b/api/js/etemplate/et2_widget_radiobox.js @@ -140,10 +140,11 @@ var et2_radiobox = /** @class */ (function (_super) { }; /** * Set radio readonly attribute. - * Do not confuse this with etemplate readonly, which would use et_textbox_ro instead + * * @param _readonly Boolean */ et2_radiobox.prototype.set_readonly = function (_readonly) { + this.options.readonly = _readonly; this.getRoot().iterateOver(function (radio) { if (radio.id == this.id) { radio.input.prop('disabled', _readonly); diff --git a/api/js/etemplate/et2_widget_radiobox.ts b/api/js/etemplate/et2_widget_radiobox.ts index 0eca3e69b7..c316b71354 100644 --- a/api/js/etemplate/et2_widget_radiobox.ts +++ b/api/js/etemplate/et2_widget_radiobox.ts @@ -174,11 +174,12 @@ class et2_radiobox extends et2_inputWidget /** * Set radio readonly attribute. - * Do not confuse this with etemplate readonly, which would use et_textbox_ro instead + * * @param _readonly Boolean */ set_readonly(_readonly) { + this.options.readonly = _readonly; this.getRoot().iterateOver(function(radio) { if (radio.id == this.id)