- md5
- c67ef47e44a12b6f30828bfe7d7c95c1
- sha1
- 81e754b02f66848e70f44546cb613a9d77db5801
- sha256
- 7c001ceec965f7c4e16556b0997fb8d41fd4929b562eeff8c4e526a1eef6c20d
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
<?php
/**
* @package Joomla.Libraries
* @subpackage Form
*
* @copyright Copyright (C) 2005 - 2016 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 a select list of help sites.
*
* @since 1.6
*/
class JFormFieldHelpsite extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
public $type = 'Helpsite';
/**
* Method to get the help site field options.
*
* @return array The field option objects.
*
* @since 1.6
*/
protected function getOptions()
{
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $this->value));
return $options;
}
/**
* Override to add refresh button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
JHtml::script('system/helpsite.js', false, true);
$showDefault = $this->getAttribute('showDefault') === 'false' ? 'false' : 'true';
$html = parent::getInput();
$button = '<button
type="button"
class="btn btn-small"
id="helpsite-refresh"
rel="' . $this->id . '"
showDefault="' . $showDefault . '"
>
<span>' . JText::_('JGLOBAL_HELPREFRESH_BUTTON') . '</span>
</button>';
return $html . $button;
}
}
The same content is in 28 releases, Joomla 3.5.0-beta2 to 3.6.5. See them all, or every version of this file.