mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Fix header customfield did not get extra options set
This commit is contained in:
parent
d99f74cbcc
commit
97e4cd7c22
@ -343,6 +343,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
|||||||
}
|
}
|
||||||
this.rows[id] = cf[0];
|
this.rows[id] = cf[0];
|
||||||
let labelWidget = null;
|
let labelWidget = null;
|
||||||
|
let useLabelWidget = false;
|
||||||
|
|
||||||
if(this.getType() == 'customfields-list') {
|
if(this.getType() == 'customfields-list') {
|
||||||
// No label, custom widget
|
// No label, custom widget
|
||||||
@ -363,6 +364,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
|||||||
const label_td = jQuery(document.createElement("td")).prependTo(row);
|
const label_td = jQuery(document.createElement("td")).prependTo(row);
|
||||||
if (['label','header'].indexOf(attrs.type || field.type) !== -1)
|
if (['label','header'].indexOf(attrs.type || field.type) !== -1)
|
||||||
{
|
{
|
||||||
|
useLabelWidget = true;
|
||||||
label_td.attr('colspan', 2).addClass('et2_customfield_'+(attrs.type || field.type));
|
label_td.attr('colspan', 2).addClass('et2_customfield_'+(attrs.type || field.type));
|
||||||
}
|
}
|
||||||
labelWidget = et2_createWidget("label", {id: id + "_label", value: label.trim(), for: id}, this);
|
labelWidget = et2_createWidget("label", {id: id + "_label", value: label.trim(), for: id}, this);
|
||||||
@ -374,7 +376,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
|||||||
setup_function !== '_setup_link_entry' && !jQuery.isEmptyObject(field.values))
|
setup_function !== '_setup_link_entry' && !jQuery.isEmptyObject(field.values))
|
||||||
{
|
{
|
||||||
const w = et2_registry[type];
|
const w = et2_registry[type];
|
||||||
const wc = window.customElements.get('et2-' + type);
|
const wc = useLabelWidget && labelWidget ? window.customElements.get("et2-label") : window.customElements.get('et2-' + type);
|
||||||
if(wc)
|
if(wc)
|
||||||
{
|
{
|
||||||
for(let attr_name in field.values)
|
for(let attr_name in field.values)
|
||||||
@ -397,7 +399,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Create widget
|
// Create widget
|
||||||
if(window.customElements.get('et2-' + type))
|
if(window.customElements.get('et2-' + type) || useLabelWidget)
|
||||||
{
|
{
|
||||||
if(typeof attrs.needed !== 'undefined')
|
if(typeof attrs.needed !== 'undefined')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user