AAAAhome/academiac/www/administrator/components/com_unitehcarousel/models/fields/mytext.php 0000604 00000006547 15137237075 0025762 0 ustar 00 element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
$text = $this->translateLabel ? JText::_($text) : $text;
// Build the class for the label.
$class = !empty($this->description) ? 'hasTip' : '';
$class = $this->required == true ? $class . ' required' : $class;
//add "hidden" to the class if hidden
if ($this->hidden){
if(empty($class))
$class = "hidden";
else
$class .= " hidden";
}
// Add the opening label tag and main attributes attributes.
$label .= '';
}
else
{
$label .= '>' . $text . '';
}
return $label;
}
/**
* Method to get the field input markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
// Initialize some field attributes.
$size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
$maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
$unit = (string)UniteFunctionsHCar::getVal($this->element, 'unit',"");
// Initialize JavaScript field attributes.
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
$html = '';
if(!empty($unit))
$html .= "$unit";
return $html;
}
}