mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
Etemplate: Fix customfield widget bug "Cannot read property ... of undefined"
This commit is contained in:
parent
9b2e6b5012
commit
aa87e60f10
@ -196,10 +196,11 @@ var et2_customfields_list = /** @class */ (function (_super) {
|
||||
if (['select', 'radio', 'radiogroup', 'checkbox', 'button'].indexOf(field.type) == -1 && !jQuery.isEmptyObject(field.values)) {
|
||||
var w = et2_registry[attrs.type ? attrs.type : field.type];
|
||||
for (var attr_name in field.values) {
|
||||
if (typeof w.prototype.attributes[attr_name] != "undefined")
|
||||
if (typeof w._attributes[attr_name] != "undefined") {
|
||||
attrs[attr_name] = field.values[attr_name];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create widget
|
||||
var widget = this.widgets[field_name] = et2_createWidget(attrs.type ? attrs.type : field.type, attrs, this);
|
||||
}
|
||||
|
@ -272,10 +272,12 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
||||
const w = et2_registry[attrs.type ? attrs.type : field.type];
|
||||
for(let attr_name in field.values)
|
||||
{
|
||||
if (typeof w.prototype.attributes[attr_name] != "undefined")
|
||||
if (typeof w._attributes[attr_name] != "undefined")
|
||||
{
|
||||
attrs[attr_name] = field.values[attr_name];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create widget
|
||||
const widget = this.widgets[field_name] = et2_createWidget(attrs.type ? attrs.type : field.type, attrs, this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user