mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Fix private field filter
This commit is contained in:
parent
26639f56f9
commit
407f3d673e
@ -126,17 +126,19 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
|
||||
}
|
||||
|
||||
// Filter fields
|
||||
if($this->attrs['field-names'])
|
||||
{
|
||||
if($this->attrs['field-names'][0] == '!') {
|
||||
$negate_field_filter = true;
|
||||
$this->attrs['field-names'] = substr($this->attrs['field_names'],1);
|
||||
}
|
||||
$field_filter = explode(',', $this->attrs['field_names']);
|
||||
}
|
||||
if($this->attrs['field-names'])
|
||||
{
|
||||
if($this->attrs['field-names'][0] == '!') {
|
||||
$negate_field_filter = true;
|
||||
$this->attrs['field-names'] = substr($this->attrs['field_names'],1);
|
||||
}
|
||||
$field_filter = explode(',', $this->attrs['field_names']);
|
||||
}
|
||||
$fields = $customfields;
|
||||
|
||||
$use_private = self::expand_name($this->attrs['use-private'],0,0);
|
||||
$use_private = self::expand_name($this->attrs['use-private'],0,0,'','',self::$cont);
|
||||
$this->attrs['sub-type'] = self::expand_name($this->attrs['sub-type'],0,0,'','',self::$cont);
|
||||
|
||||
foreach((array)$fields as $key => $field)
|
||||
{
|
||||
// remove private or non-private cf's, if only one kind should be displayed
|
||||
|
@ -46,10 +46,14 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
"default": "",
|
||||
"type": "any", // String or array
|
||||
"description": "Filter displayed custom fields by their 'type2' attribute"
|
||||
},
|
||||
'private': {
|
||||
ignore: true,
|
||||
type: 'boolean'
|
||||
}
|
||||
},
|
||||
|
||||
legacyOptions: ["type_filter"], // Field restriction & private done server-side
|
||||
legacyOptions: ["type_filter","private"], // Field restriction & private done server-side
|
||||
|
||||
prefix: '#',
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user