diff --git a/doc/conf/LSattribute.docbook b/doc/conf/LSattribute.docbook index 7c34089c..e80211b7 100644 --- a/doc/conf/LSattribute.docbook +++ b/doc/conf/LSattribute.docbook @@ -19,6 +19,7 @@ 'label' => '[label de l'attr1', 'displayAttrName' => '[booleen]', 'help_info' => '[Message d'aide sur l'attribut attr1]', + 'help_info_in_view' => '[booleen]', 'ldap_type' => 'ldaptype1', 'ldap_options' => array( // Options LDAP liées au type LDAP de l'attribut @@ -91,6 +92,16 @@ + + help_info_in_view + + Booléen définissant si le message d'aide doit être affiché sur la vue + de visualisation de l'objet. + Valeurs possibles : 0 ou 1 + Valeur par défaut : 0 + + + ldap_type diff --git a/public_html/includes/class/class.LSformElement.php b/public_html/includes/class/class.LSformElement.php index 6156d428..d4e98e5b 100644 --- a/public_html/includes/class/class.LSformElement.php +++ b/public_html/includes/class/class.LSformElement.php @@ -198,6 +198,7 @@ class LSformElement { } if (!empty($help_infos)) $return['help_info'] = implode(' - ', $help_infos); + $return['help_info_in_view'] = $this -> getParam('help_info_in_view', false, 'bool'); return $return; } diff --git a/public_html/templates/default/LSform_view.tpl b/public_html/templates/default/LSform_view.tpl index 08c807c7..75f339ff 100644 --- a/public_html/templates/default/LSform_view.tpl +++ b/public_html/templates/default/LSform_view.tpl @@ -26,7 +26,7 @@ {foreach from=$tab.args item=arg} {if $LSform_fields[$arg]} {assign var='field' value='oui'} -
{$LSform_fields[$arg].label|escape:"htmlall"}
+
{$LSform_fields[$arg].label|escape:"htmlall"}{if $LSform_fields[$arg].help_info_in_view && $LSform_fields[$arg].help_info!=""} ?{/if}
{$LSform_fields[$arg].html}
{/if} {/foreach}