diff --git a/etemplate/inc/class.etemplate_widget_customfields.inc.php b/etemplate/inc/class.etemplate_widget_customfields.inc.php index ded94e65a7..987425e50b 100644 --- a/etemplate/inc/class.etemplate_widget_customfields.inc.php +++ b/etemplate/inc/class.etemplate_widget_customfields.inc.php @@ -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 diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index a55e362fb3..5bb54e1cc4 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -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: '#',