10 defined(
'JPATH_PLATFORM') or die;
31 protected $type =
'Range';
40 protected function getInput()
43 $max = !empty($this->max) ?
' max="' . $this->max .
'"' :
'';
44 $min = !empty($this->min) ?
' min="' . $this->min .
'"' :
'';
45 $step = !empty($this->step) ?
' step="' . $this->step .
'"' :
'';
46 $class = !empty($this->
class) ?
' class="' . $this->
class . '"' : '';
47 $readonly = $this->readonly ? ' readonly' : '';
48 $disabled = $this->disabled ? ' disabled' : '';
50 $autofocus = $this->autofocus ? ' autofocus' : '';
52 $value = (float) $this->value;
53 $value = empty($value) ? $this->min : $value;
56 $onchange = !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : '';
59 JHtml::_('jquery.framework');
60 JHtml::_('script', 'system/html5fallback.js', false, true);
62 return '<input type="range" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
63 . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $disabled . $readonly
64 . $onchange . $max . $step . $min . $autofocus . ' />';