From 1d1e3e344a27732adaf5ee7f0e9c90a43a7aa882 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 19 Nov 2010 18:41:10 +0100 Subject: [PATCH] LSformElement : add displayAttrName parameter --- public_html/includes/class/class.LSformElement.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public_html/includes/class/class.LSformElement.php b/public_html/includes/class/class.LSformElement.php index 64c7c1ad..cdf07321 100644 --- a/public_html/includes/class/class.LSformElement.php +++ b/public_html/includes/class/class.LSformElement.php @@ -189,9 +189,17 @@ class LSformElement { $return['required']=true; } $return['label'] = $this -> getLabel(); - if (isset($this -> params['help_info'])) { - $return['help_info']=__($this -> params['help_info']); + $help_info = ""; + if ( (isset($this -> params['displayAttrName']) && $this -> params['displayAttrName']) || (isset($this -> attr_html -> attribute -> ldapObject -> config['displayAttrName']) && $this -> attr_html -> attribute -> ldapObject -> config['displayAttrName']) ) { + $help_info=_("Attribute")." : ".$this -> name."\n"; } + if (isset($this -> params['help_info'])) { + if (!empty($help_info)) $help_info .= " - "; + $help_info.=__($this -> params['help_info']); + } + if (!empty($help_info)) + $return['help_info'] = $help_info; + return $return; }