* @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Form Field class for the Joomla Platform. * Supports a nested checkbox field listing user groups. * Multiselect is available by default. * * @since 1.7.0 * @deprecated 3.5 */ class JFormFieldUsergroup extends JFormField { /** * The form field type. * * @var string * @since 1.7.0 */ protected $type = 'Usergroup'; /** * Method to get the user group field input markup. * * @return string The field input markup. * * @since 1.7.0 */ protected function getInput() { JLog::add('JFormFieldUsergroup is deprecated. Use JFormFieldUserGroupList instead.', JLog::WARNING, 'deprecated'); $options = array(); $attr = ''; // Initialize some field attributes. $attr .= !empty($this->class) ? ' class="' . $this->class . '"' : ''; $attr .= $this->disabled ? ' disabled' : ''; $attr .= $this->size ? ' size="' . $this->size . '"' : ''; $attr .= $this->multiple ? ' multiple' : ''; $attr .= $this->required ? ' required aria-required="true"' : ''; $attr .= $this->autofocus ? ' autofocus' : ''; // Initialize JavaScript field attributes. $attr .= !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : ''; $attr .= !empty($this->onclick) ? ' onclick="' . $this->onclick . '"' : ''; // Iterate through the children and build an array of options. foreach ($this->element->children() as $option) { // Only add