mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 22:08:45 +01:00
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)) {
|
if (['select', 'radio', 'radiogroup', 'checkbox', 'button'].indexOf(field.type) == -1 && !jQuery.isEmptyObject(field.values)) {
|
||||||
var w = et2_registry[attrs.type ? attrs.type : field.type];
|
var w = et2_registry[attrs.type ? attrs.type : field.type];
|
||||||
for (var attr_name in field.values) {
|
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];
|
attrs[attr_name] = field.values[attr_name];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Create widget
|
// 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];
|
const w = et2_registry[attrs.type ? attrs.type : field.type];
|
||||||
for(let attr_name in field.values)
|
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];
|
{
|
||||||
|
attrs[attr_name] = field.values[attr_name];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Create widget
|
// Create widget
|
||||||
|
Loading…
Reference in New Issue
Block a user