forked from extern/egroupware
Etemplate: Fix customfield widget bug "Cannot read property ... of undefined"
This commit is contained in:
parent
9b2e6b5012
commit
aa87e60f10
@ -196,8 +196,9 @@ 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
|
||||
|
@ -272,8 +272,10 @@ 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")
|
||||
attrs[attr_name] = field.values[attr_name];
|
||||
if (typeof w._attributes[attr_name] != "undefined")
|
||||
{
|
||||
attrs[attr_name] = field.values[attr_name];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create widget
|
||||
|
Loading…
Reference in New Issue
Block a user