Your IP : 216.73.216.85


Current Path : /home/smartconb/www/armencom33/administrator/components/com_eyesite/views/config/
Upload File :
Current File : /home/smartconb/www/armencom33/administrator/components/com_eyesite/views/config/view.html.php

<?php
/********************************************************************
Product     : Eyesite
Date		: 22 January 2024
Copyright	: Les Arbres Design 2009-2024
Contact	    : https://www.lesarbresdesign.info
Licence     : GNU General Public License
*********************************************************************/
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Toolbar\ToolbarHelper;

class EyesiteViewConfig extends HtmlView
{

//-------------------------------------------------------------------------------
// Show the configuration form
//
function display($tpl = null)
{
	LAE_helper::addSubMenu('config');
	LAE_helper::viewStart();
	ToolBarHelper::title('Eyesite: '.Text::_('COM_EYESITE_CONFIGURATION'), 'lad.png');
	ToolBarHelper::custom('email_test', 'mail.png', '', 'COM_EYESITE_TEST_EMAIL', false);
	ToolBarHelper::apply('config_apply');
	ToolBarHelper::save('config_save');
	ToolBarHelper::cancel('cancel_to_main','JTOOLBAR_CLOSE');	
	$user = Factory::getApplication()->getIdentity();
	if ($user->authorise('core.admin'))
		ToolBarHelper::preferences('com_eyesite');
		
	echo '<div class="ey-info">%SITE_ROOT% = '.JPATH_SITE. '</div>';
    echo '<form method="post" id="adminForm" class="form-horizontal">';
	echo HTMLHelper::_('form.token');
	echo '<input type="hidden" name="option" value="com_eyesite">';
	echo '<input type="hidden" name="task" value="">';

	Form::addFieldPath(LAE_FORM_FIELD_PATH);
	$form = Form::getInstance('config', LAE_FORMS_PATH.'/config.xml');
    $form->bind($this->config_data);
    $fields = $form->getFieldset('main');
    foreach ($fields as $field)
        {
        $field_name = $field->name;
		$label = $form->getLabel($field_name);
		$input = $form->getInput($field_name);
		$description = Text::_($field->getAttribute('desc',''));
		echo '<div class="control-group">';
		echo '<div class="config_label">'.$label.'<span">'.$description.'<span></div>';
		echo '<div class="controls">'.$input.'</div>';
		echo '</div>';
        }
    echo '</form>';
	LAE_helper::viewEnd();
}
			
}