* @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 = ''; 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 .= '
'; return $html; } }