Fix private field filter

This commit is contained in:
Nathan Gray 2013-11-27 17:17:37 +00:00
parent 26639f56f9
commit 407f3d673e
2 changed files with 16 additions and 10 deletions

View File

@ -136,7 +136,9 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
}
$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

View File

@ -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: '#',