*/ class LSformElement_boolean extends LSformElement { var $fieldTemplate = 'LSformElement_boolean_field.tpl'; var $template = 'LSformElement_boolean.tpl'; /** * Retourne les infos d'affichage de l'élément * * Cette méthode retourne les informations d'affichage de l'élement * * @retval array */ function getDisplay(){ $return = $this -> getLabelInfos(); if (!$this -> isFreeze()) { // Help Infos LSsession :: addHelpInfos( 'LSformElement_boolean', array( 'clear' => _('Reset the choice.') ) ); LSsession :: addJSscript('LSformElement_boolean.js'); } $return['html'] = $this -> fetchTemplate( NULL, array( 'yesTxt' => (isset($this -> params['html_options']['true_label']) && !empty($this -> params['html_options']['true_label']))?__($this -> params['html_options']['true_label']):_('Yes'), 'noTxt' => (isset($this -> params['html_options']['false_label']) && !empty($this -> params['html_options']['false_label']))?__($this -> params['html_options']['false_label']):_('No'), ) ); return $return; } } ?>