diff --git a/api/js/etemplate/et2_extension_customfields.js b/api/js/etemplate/et2_extension_customfields.js index 89ae9184d1..6d27bd4a28 100644 --- a/api/js/etemplate/et2_extension_customfields.js +++ b/api/js/etemplate/et2_extension_customfields.js @@ -439,9 +439,15 @@ var et2_customfields_list = /** @class */ (function (_super) { }; et2_customfields_list.prototype._setup_checkbox = function (field_name, field, attrs) { // Read-only checkbox is just text - if (attrs.readonly) { + if (attrs.readonly && this.getType() !== "customfields") { attrs.ro_true = field.label; } + else if (field.hasOwnProperty('ro_true')) { + attrs.ro_true = field.ro_true; + } + if (field.hasOwnProperty('ro_false')) { + attrs.ro_false = field.ro_false; + } return true; }; /** diff --git a/api/js/etemplate/et2_extension_customfields.ts b/api/js/etemplate/et2_extension_customfields.ts index 2d1a8f0ac7..4acea52451 100644 --- a/api/js/etemplate/et2_extension_customfields.ts +++ b/api/js/etemplate/et2_extension_customfields.ts @@ -599,10 +599,18 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac _setup_checkbox( field_name, field, attrs) { // Read-only checkbox is just text - if(attrs.readonly) + if(attrs.readonly && this.getType() !== "customfields") { attrs.ro_true = field.label; } + else if (field.hasOwnProperty('ro_true')) + { + attrs.ro_true = field.ro_true; + } + if (field.hasOwnProperty('ro_false')) + { + attrs.ro_false = field.ro_false; + } return true; }