* @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');
include_once JPATH_ADMINISTRATOR . '/components/com_jchoptimize/version.php';
class JFormFieldJchdescription extends JFormField
{
public $type = 'jchdescription';
protected function getLabel()
{
return '';
}
protected function getInput()
{
$attributes = $this->element->attributes();
$html = '';
switch ($attributes['section'])
{
case 'features':
$header = JText::_('JCH_HEADER_MAJOR_FEATURES');
$pro_only = ' ' . JText::_('JCH_FEATURES_PRO_ONLY') . '';
$description = '
'
. '- ' . JText::_('JCH_FEATURES_COMBINE_FILES') . '
'
. '- ' . JText::_('JCH_FEATURES_AUTO_SETTINGS') . '
'
. '- ' . JText::_('JCH_FEATURES_SPRITE_GENERATOR') . '
'
. '- ' . JText::_('JCH_FEATURES_IMAGE_ATTRIBUTES') . '
'
. '- ' . JText::_('JCH_FEATURES_CRITICAL_CSS') . '
'
. '- ' . JText::_('JCH_FEATURES_LAZY_LOAD') . '
'
. '- ' . JText::_('JCH_FEATURES_CDN') . '
'
. '- ' . JText::_('JCH_FEATURES_PRO_CDN') . $pro_only . '
'
. '- ' . JText::_('JCH_FEATURES_PRO_HTTP2') . $pro_only . '
'
. '- ' . JText::_('JCH_FEATURES_PRO_REMOVE_UNUSED_CSS') . $pro_only . '
'
. '- ' . JText::_('JCH_FEATURES_PRO_LAZY_LOAD') . $pro_only . '
'
. '- ' . JText::_('JCH_FEATURES_PRO_OPTIMIZE_IMAGES') . $pro_only . '
'
. '
';
break;
case 'support':
$header = JText::_('JCH_HEADER_SUPPORT');
$description = '' . JText::sprintf('JCH_SUPPORT_DOCUMENTATION', 'https://www.jch-optimize.net/documentation.html') . '
'
. '' . JText::sprintf('JCH_SUPPORT_REQUESTS', 'https://www.jch-optimize.net/subscribe/levels.html') . '
';
break;
case 'feedback':
$header = JText::_('JCH_HEADER_FEEDBACK');
$description = '' . JText::sprintf('JCH_FEEDBACK_DESCRIPTION', 'https://extensions.joomla.org/extension/core-enhancements/performance/jch-optimize/') . '
';
break;
case 'version':
$header = '';
$description = '(Version ' . JCH_VERSION . ')
'/* ####
. '
'
. 'Upgrade to the pro version now using coupon code JCHGOPRO20 for a 20% discount!!
' #### */;
break;
default:
break;
}
$html .= '';
$html .= '';
$html .= $header == '' ? '' : '
' . $header . '
';
$html .= $description;
$html .= '';
$html .= '