/** * write out the label for the form element * @param object form * @param bol encase label in <label> tag * @param string id of element related to the label */ function getLabel($repeatCounter = 0, $tmpl = '') { $params = $this->getParams(); $element = $this->getElement(); if (!$params->get('display_showlabel', true)) { $element->label = $this->getValue(array()); } return parent::getLabel($repeatCounter, $tmpl); }
/** * write out the label for the form element * @param object form * @param bol encase label in <label> tag * @param string id of element related to the label */ function getLabel($repeatCounter = 0, $tmpl = '') { $params = $this->getParams(); if ($params->get('display_showlabel', true)) { return parent::getLabel($repeatCounter, $tmpl); } $bLabel = $this->get('hasLabel'); $element = $this->getElement(); $element->label = $this->getValue(array()); $elementHTMLId = $this->getHTMLId(); if ($element->hidden) { return ''; } $task = JRequest::getVar('task', '', 'default'); $view = JRequest::getVar('view', '', 'form'); if ($view == 'form' && ! ( $this->canUse() || $this->canView())) { return ''; } $params = $this->getParams(); $elementid = "fb_el_" . $elementHTMLId; $this->_form->loadValidationRuleClasses(); $str = ''; $rollOver = JText::_($params->get('hover_text_title')) . "::" . JText::_($params->get('rollover')); $rollOver = htmlspecialchars($rollOver, ENT_QUOTES); if ($this->canView()) { $str .= "<div class=\"fabrikLabel fabrikPluginElementDisplayLabel"; $validations = $this->getValidations(); if ($this->_editable) { foreach ($validations as $validation) { $vid = $validation->_pluginName; if (array_key_exists($vid, $this->_form->_validationRuleClasses)) { if ($this->_form->_validationRuleClasses[$vid] != '') { $str .= " " . $this->_form->_validationRuleClasses[$vid]; } } } } if ($rollOver != '::') { $str .= " fabrikHover"; } $str .= "\" id=\"$elementid" . "_text\">"; if ($bLabel) { $str .= "<label for=\"$elementHTMLId\">"; } $str .= ($rollOver != '::') ? "<span class='hasTip' title='$rollOver'>{$element->label}</span>" : $element->label; if ($bLabel) { $str .= "</label>"; } $str .= "</div>\n"; } return $str; }
function getLabel($repeatCounter, $tmpl = '') { $user = JFactory::getUser(); $params = $this->getParams(); if ($user->id != 0) { if ($params->get('captcha-showloggedin', 0) == 0) { return ''; } } return parent::getLabel($repeatCounter, $tmpl); }