Your IP : 216.73.216.218


Current Path : /home/antonen/keliauk-uk.lt/modules/mod_qlform/php/fields/
Upload File :
Current File : /home/antonen/keliauk-uk.lt/modules/mod_qlform/php/fields/adminstyle.php

<?php
/**
 * @package		mod_form
 * @copyright	Copyright (C) 2017 ql.de All rights reserved.
 * @author 		Mareike Riegel mareike.riegel@ql.de
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
jimport('joomla.html.html');
jimport('joomla.form.formfield');

class JFormFieldAdminstyle extends JFormField
{
    /**
     * The form field type.
     *
     * @var  string
     * @since 1.6
     */
    protected $type = 'adminstyle'; //the form field type see the name is the same
    /**
     * Method to retrieve the lists that resides in your application using the API.
     *
     * @return array The field option objects.
     * @since 1.6
     */
    protected function getInput()
    {

        if(0==$this->getAttribute('value'))JFactory::getDocument()->addStyleSheet(JUri::root().'/modules/mod_qlform/css/adminBasic.css');
        elseif(1==$this->getAttribute('value'))JFactory::getDocument()->addStyleSheet(JUri::root().'/modules/mod_qlform/css/adminPro.css');
        return '<input type="hidden" id="'.$this->id.'" name="' . $this->name . '" value="'.$this->value.'"/>';
    }
}