From 538d25333e077d8241bcf1f72c9f2309afc56a0a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 13 May 2020 11:39:38 +0200 Subject: [PATCH] Add missing js file from previous commit --- api/js/etemplate/et2_widget_checkbox.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/js/etemplate/et2_widget_checkbox.js b/api/js/etemplate/et2_widget_checkbox.js index 6fc8e5b3ed..ceb8af8159 100644 --- a/api/js/etemplate/et2_widget_checkbox.js +++ b/api/js/etemplate/et2_widget_checkbox.js @@ -144,6 +144,18 @@ var et2_checkbox = /** @class */ (function (_super) { return this.options.unselected_value; } }; + et2_checkbox.prototype.set_disabled = function (_value) { + var parentNode = jQuery(this.getDOMNode()).parent(); + if (parentNode[0] && parentNode[0].nodeName == "label" && parentNode.hasClass('.et2_checkbox_label')) { + if (_value) { + parentNode.hide(); + } + else { + parentNode.show(); + } + } + _super.prototype.set_disabled.call(this, _value); + }; et2_checkbox._attributes = { "selected_value": { "name": "Set value",