LSformElement : add displayAttrName parameter

This commit is contained in:
Benjamin Renard 2010-11-19 18:41:10 +01:00
parent dc5b3b44d1
commit 1d1e3e344a

View file

@ -189,9 +189,17 @@ class LSformElement {
$return['required']=true; $return['required']=true;
} }
$return['label'] = $this -> getLabel(); $return['label'] = $this -> getLabel();
if (isset($this -> params['help_info'])) { $help_info = "";
$return['help_info']=__($this -> params['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; return $return;
} }