* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
* @license GNU/GPLv3, or later. See LICENSE file
*
* If LICENSE file missing, see .
*/
defined('_JEXEC') or die('No direct access');
class JFormFieldJchgroup extends JFormField
{
public $type = 'jchgroup';
protected function getLabel()
{
return '';
}
protected function getInput()
{
$attributes = $this->element->attributes();
$html = '';
$header = isset($attributes['label']) ? '
' . JText::_($attributes['label']) . '
' : '';
$description = isset($attributes['description']) ? '' . JText::_($attributes['description']) . '
' : '';
$section = $attributes['section'];
$name = $attributes['name'];
$class = isset($attributes['class']) !== false ? 'class="' . $attributes['class'] . '" ' : '';
$collapsible = '';
$collapsible .= $header;
$collapsible .= $description . '
';
$collapsible .= '
';
if (version_compare(JVERSION, '3.0', '>='))
{
$html .= '
';
if ($section == 'start')
{
$html .= '';
$html .= $collapsible;
}
else
{
$html .= '
';
}
$html .= '';
}
else
{
if ($section == 'start')
{
$html .= '
';
$html .= $collapsible;
$html .= '
';
}
}
return $html;
}
}