*/ 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 */ public 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' => __($this -> getParam('html_options.true_label', 'Yes')), 'noTxt' => __($this -> getParam('html_options.false_label', 'No')), ) ); return $return; } }