mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 15:38:27 +01:00
Fix private custom field filtering
This commit is contained in:
parent
a140cd1f25
commit
8c20d825cb
@ -199,7 +199,10 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
|
|||||||
{
|
{
|
||||||
// This widget has different settings from global
|
// This widget has different settings from global
|
||||||
$this->setElementAttribute($form_name, 'customfields', $fields);
|
$this->setElementAttribute($form_name, 'customfields', $fields);
|
||||||
$this->setElementAttribute($form_name, 'fields', array_fill_keys(array_keys($fields), true));
|
$this->setElementAttribute($form_name, 'fields', array_merge(
|
||||||
|
array_fill_keys(array_keys($customfields), false),
|
||||||
|
array_fill_keys(array_keys($fields), true)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
parent::beforeSendToClient($cname);
|
parent::beforeSendToClient($cname);
|
||||||
|
|
||||||
|
@ -103,10 +103,10 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
|||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
this.rows = {};
|
||||||
|
this.widgets = {};
|
||||||
|
this.detachedNodes = [];
|
||||||
this.tbody = null;
|
this.tbody = null;
|
||||||
this.table = null;
|
|
||||||
this.rows = null;
|
|
||||||
this.widgets = null;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -288,6 +288,9 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
|||||||
if(!this.options.customfields) return;
|
if(!this.options.customfields) return;
|
||||||
for(var field_name in this.options.customfields)
|
for(var field_name in this.options.customfields)
|
||||||
{
|
{
|
||||||
|
// Skip fields if we're filtering
|
||||||
|
if(!jQuery.isEmptyObject(this.options.fields) && !this.options.fields[field_name]) continue;
|
||||||
|
|
||||||
// Make sure widget is created, and has the needed function
|
// Make sure widget is created, and has the needed function
|
||||||
if(!this.widgets[field_name] || !this.widgets[field_name].set_value) continue;
|
if(!this.widgets[field_name] || !this.widgets[field_name].set_value) continue;
|
||||||
var value = _value[this.prefix + field_name] ? _value[this.prefix + field_name] : null;
|
var value = _value[this.prefix + field_name] ? _value[this.prefix + field_name] : null;
|
||||||
|
Loading…
Reference in New Issue
Block a user