mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Etemplate: Allow to specify the read only true/false values for checkbox customfields
This commit is contained in:
parent
dad82bf1f1
commit
867fcc17c6
@ -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;
|
||||
};
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user