hidden) { return $label; } // Get the label text from the XML element, defaulting to the element name. $text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name']; $text = $this->translateLabel ? JText::_($text) : $text; // Set required to true as this field is not displayed at all if not required. $this->required = true; // Add CSS and JS for the TOS field $doc = JFactory::getDocument(); $css = "#jform_profile_tos {width: 18em; margin: 0 !important; padding: 0 2px !important;} #jform_profile_tos input {margin:0 5px 0 0 !important; width:10px !important;} #jform_profile_tos label {margin:0 15px 0 0 !important; width:auto;} "; $doc->addStyleDeclaration($css); JHtml::_('behavior.modal'); // Build the class for the label. $class = !empty($this->description) ? 'hasTip' : ''; $class = $class . ' required'; $class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class; // Add the opening label tag and main attributes attributes. $label .= ''; return $label; } }