Exemplo n.º 1
0
 public function getField($type, $attributes = array(), $field_value = '')
 {
     static $types = null;
     $defaults = array('name' => '', 'id' => '');
     if (!$types) {
         jimport('joomla.form.helper');
         $types = array();
     }
     if (!in_array($type, $types)) {
         JFormHelper::loadFieldClass($type);
     }
     try {
         $attributes = array_merge($defaults, $attributes);
         $xml = new JXMLElement('<?xml version="1.0" encoding="utf-8"?><field />');
         foreach ($attributes as $key => $value) {
             if ('_options' == $key) {
                 foreach ($value as $_opt_value) {
                     $xml->addChild('option', $_opt_value->text)->addAttribute('value', $_opt_value->value);
                 }
                 continue;
             }
             $xml->addAttribute($key, $value);
         }
         $class = 'JFormField' . $type;
         $field = new $class();
         $field->setup($xml, $field_value);
         return $field;
     } catch (Exception $e) {
         return false;
     }
 }
Exemplo n.º 2
0
 function renderInput($values = null, $options = array())
 {
     if (!$this->_isCompatible) {
         return '';
     }
     $tags = array();
     if (!empty($values)) {
         foreach ($values as $v) {
             if (is_object($v)) {
                 $tags[] = $v->tag_id;
             } else {
                 $tags[] = (int) $v;
             }
         }
     }
     if (empty($options['name'])) {
         $options['name'] = 'tags';
     }
     if (empty($options['mode'])) {
         $options['mode'] = 'ajax';
     }
     if (!isset($options['class'])) {
         $options['class'] = 'inputbox span12 small';
     }
     if (!isset($options['multiple'])) {
         $options['multiple'] = true;
     }
     $xmlConf = new SimpleXMLElement('<field name="' . $options['name'] . '" type="tag" mode="' . $options['mode'] . '" label="" class="' . $options['class'] . '" multiple="' . ($options['multiple'] ? 'true' : 'false') . '"></field>');
     JFormHelper::loadFieldClass('tag');
     $jform = new JForm('hikashop');
     $fieldTag = new JFormFieldTag();
     $fieldTag->setForm($jform);
     $fieldTag->setup($xmlConf, $tags);
     return $fieldTag->input;
 }
Exemplo n.º 3
0
 function displayAll($id, $map, $color)
 {
     if (HIKASHOP_J25) {
         $xmlConf = new SimpleXMLElement('<field name="' . $map . '" type="color" label=""></field>');
         JFormHelper::loadFieldClass('color');
         $jform = new JForm('hikashop');
         $fieldTag = new JFormFieldColor();
         $fieldTag->setForm($jform);
         $fieldTag->setup($xmlConf, $color);
         return $fieldTag->input;
     }
     $code = '<input type="text" name="' . $map . '" id="color' . $id . '" onchange=\'applyColorExample' . $id . '()\' class="inputbox" size="10" value="' . $color . '" />' . ' <input size="10" maxlength="0" style=\'cursor:pointer;background-color:' . $color . '\' onclick="if(document.getElementById(\'colordiv' . $id . '\').style.display == \'block\'){document.getElementById(\'colordiv' . $id . '\').style.display = \'none\';}else{document.getElementById(\'colordiv' . $id . '\').style.display = \'block\';}" id=\'colorexample' . $id . '\' />' . '<div id=\'colordiv' . $id . '\' style=\'display:none;position:absolute;background-color:white;border:1px solid grey;z-index:999\'>' . $this->display($id) . '</div>';
     return $code;
 }
Exemplo n.º 4
0
<?php

/**
 * @package     Joomla.UnitTest
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
JFormHelper::loadFieldClass('filelist');
/**
 * Test class for JFormFieldFileList.
 *
 * @package     Joomla.UnitTest
 * @subpackage  Form
 * @since       12.1
 */
class JFormFieldFileListTest extends TestCase
{
    /**
     * Test the getInput method.
     *
     * @return  void
     *
     * @since   12.1
     */
    public function testGetInput()
    {
        $form = new JForm('form1');
        $this->assertThat($form->load('<form><field name="filelist" type="filelist" directory="modules/mod_finder/tmpl" /></form>'), $this->isTrue(), 'Line:' . __LINE__ . ' XML string should load successfully.');
        $field = new JFormFieldFileList($form);
Exemplo n.º 5
0
<?php

/**
 * @package    FrameworkOnFramework
 * @subpackage form
 * @subpackage form
 * @copyright  Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('_JEXEC') or die;
JFormHelper::loadFieldClass('usergroup');
/**
 * Form Field class for F0F
 * Joomla! user groups
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class F0FFormFieldUsergroup extends JFormFieldUsergroup implements F0FFormField
{
    protected $static;
    protected $repeatable;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /** @var   F0FTable  The item being rendered in a repeatable form field */
    public $item;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
Exemplo n.º 6
0
<?php

/**
 * @package     Joomla.Libraries
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('groupedlist');
/**
 * Form Field class for the Joomla CMS.
 * Supports a select grouped list of template styles
 *
 * @package     Joomla.Libraries
 * @subpackage  Form
 * @since       1.6
 */
class JFormFieldTemplatestyle extends JFormFieldGroupedList
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  1.6
     */
    public $type = 'TemplateStyle';
    /**
     * Method to get the list of template style options
     * grouped by template.
<?php

jimport('joomla.form.helper');
JFormHelper::loadFieldClass('calendar');
class JFormFieldYearMonth extends JFormFieldCalendar
{
    /**
     * Method to get the field input markup.
     *
     * @return  string  The field input markup.
     *
     * @since   11.1
     */
    protected function getInput()
    {
        // Translate placeholder text
        $hint = $this->translateHint ? JText::_($this->hint) : $this->hint;
        // Initialize some field attributes.
        $format = $this->format;
        // Build shared the attributes array.
        $attributes = array();
        empty($this->class) ? null : ($attributes['class'] = $this->class);
        !$this->readonly ? null : ($attributes['readonly'] = 'readonly');
        !$this->disabled ? null : ($attributes['disabled'] = 'disabled');
        empty($this->onchange) ? null : ($attributes['onchange'] = $this->onchange);
        empty($hint) ? null : ($attributes['placeholder'] = $hint);
        if ($this->required) {
            $attributes['required'] = '';
            $attributes['aria-required'] = 'true';
        }
        // Parse 'NOW' to current time
Exemplo n.º 8
0
/**
 * @package: SobiPro Library
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: https://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 */
defined('SOBIPRO') || exit('Restricted access');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('user');
/**
 * @property mixed input
 */
class SPFormFieldUser extends JFormFieldUser
{
    public function setup($data)
    {
        foreach ($data as $k => $v) {
            $this->{$k} = $v;
        }
    }
}
Exemplo n.º 9
0
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Ozio Gallery is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
*
* @copyright Copyright (C) 2010 Open Source Solutions S.L.U. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see RT-LICENSE.php
*/
jimport("joomla.form.formfield");
JFormHelper::loadFieldClass("list");
class JFormFieldListNanoAlbums extends JFormFieldList
{
    protected $type = "ListNanoAlbums";
    protected function getInput()
    {
        static $resources = true;
        $i18n = array('public' => JText::_("COM_OZIOGALLERY3_ALBUM_PUBLIC"), 'private' => JText::_("COM_OZIOGALLERY3_ALBUM_PRIVATE"), 'protected' => JText::_("COM_OZIOGALLERY3_ALBUM_PROTECTED"), 'topublic' => JText::_("COM_OZIOGALLERY3_ALBUM_TOPUBLIC"), 'toprivate' => JText::_("COM_OZIOGALLERY3_ALBUM_TOPRIVATE"), 'toprotected' => JText::_("COM_OZIOGALLERY3_ALBUM_TOPROTECTED"));
        if ($resources) {
            $resources = false;
            $document = JFactory::getDocument();
            $document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/listnanoalbums.js");
            $document->addScript(JUri::base(true) . "/components/com_oziogallery3/js/get_id.js");
            $document->addScriptDeclaration("var g_ozio_admin_buttons=" . json_encode($i18n) . ";");
            $document->addStyleSheet(JUri::base(true) . "/components/com_oziogallery3/models/fields/fields.css");
        }
Exemplo n.º 10
0
<?php

/**
 * @package         NoNumber Framework
 * @version         16.2.2173
 * 
 * @author          Peter van Westen <*****@*****.**>
 * @link            http://www.nonumber.nl
 * @copyright       Copyright © 2016 NoNumber All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
require_once dirname(__DIR__) . '/helpers/text.php';
JFormHelper::loadFieldClass('note');
class JFormFieldNN_Note extends JFormFieldNote
{
    public $type = 'Note';
    public function setup(SimpleXMLElement $element, $value, $group = null)
    {
        $this->element = $element;
        $element['label'] = $this->prepareText($element['label']);
        $element['description'] = $this->prepareText($element['description']);
        $element['translateDescription'] = false;
        return parent::setup($element, $value, $group);
    }
    public function prepareText($string = '')
    {
        $string = trim($string);
        if ($string == '') {
            return '';
        }
Exemplo n.º 11
0
<?php

/**
 * @package    FrameworkOnFramework
 * @subpackage form
 * @copyright  Copyright (C) 2010 - 2014 Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
JFormHelper::loadFieldClass('cachehandler');
/**
 * Form Field class for FOF
 * Joomla! cache handlers
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class FOFFormFieldCachehandler extends JFormFieldCacheHandler implements FOFFormField
{
    protected $static;
    protected $repeatable;
    /** @var   FOFTable  The item being rendered in a repeatable form field */
    public $item;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
     *
Exemplo n.º 12
0
<?php

/**
 * @package    FrameworkOnFramework
 * @subpackage form
 * @subpackage form
 * @copyright  Copyright (C) 2010 - 2014 Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('F0F_INCLUDED') or die;
JFormHelper::loadFieldClass('accesslevel');
/**
 * Form Field class for F0F
 * Joomla! access levels
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class F0FFormFieldAccesslevel extends JFormFieldAccessLevel implements F0FFormField
{
    protected $static;
    protected $repeatable;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /** @var   F0FTable  The item being rendered in a repeatable form field */
    public $item;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
Exemplo n.º 13
0
<?php

/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
jimport('joomla.form.formfield');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('Media');
/**
 * Form Field class for the Joomla Platform.
 * Provides a modal media selector including upload mechanism
 *
 * @package     Joomla.Platform
 * @subpackage  Form
 * @since       11.1
 */
class JFormFieldMediakey extends JFormFieldMedia
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  11.1
     */
    protected $type = 'Mediakey';
    /**
Exemplo n.º 14
0
<?php

/**
 * Element: Password
 *
 * @package         NoNumber Framework
 * @version         
 *
 * @author          Peter van Westen <*****@*****.**>
 * @link            http://www.nonumber.nl
 * @copyright       Copyright © 2015 NoNumber All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php';
JFormHelper::loadFieldClass('password');
class JFormFieldNN_Password extends JFormFieldPassword
{
    public $type = 'Password';
    public function setup(SimpleXMLElement $element, $value, $group = null)
    {
        $this->element = $element;
        $element['label'] = $this->prepareText($element['label']);
        $element['description'] = $this->prepareText($element['description']);
        $element['translateDescription'] = false;
        return parent::setup($element, $value, $group);
    }
    private function prepareText($string = '')
    {
        $string = trim($string);
        if ($string == '') {
Exemplo n.º 15
0
<?php

/**
 * @package    FrameworkOnFramework
 * @subpackage form
 * @copyright   Copyright (C) 2010 - 2015 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
JFormHelper::loadFieldClass('captcha');
/**
 * Form Field class for the FOF framework
 * Supports a captcha field.
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class FOFFormFieldCaptcha extends JFormFieldCaptcha implements FOFFormField
{
    protected $static;
    protected $repeatable;
    /** @var   FOFTable  The item being rendered in a repeatable form field */
    public $item;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
     *
Exemplo n.º 16
0
<?php

/**
* @package   ZOO Category
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
defined('JPATH_BASE') or die;
jimport('joomla.html.html');
jimport('joomla.form.formfield');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('menuitem');
class JFormFieldZooMenuItem extends JFormFieldMenuItem
{
    public $type = 'ZooMenuItem';
    protected function getGroups()
    {
        // get app instance
        $app = App::getInstance('zoo');
        // Merge the select item option into existing groups
        return array_merge(array(array($app->html->_('select.option', '', '- ' . JText::_('Select Item') . ' -', 'value', 'text'))), parent::getGroups());
    }
}
Exemplo n.º 17
0
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  User.profile
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('radio');
/**
 * Provides input for TOS
 *
 * @package     Joomla.Plugin
 * @subpackage  User.profile
 * @since       2.5.5
 */
class JFormFieldTos extends JFormFieldRadio
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  2.5.5
     */
    protected $type = 'Tos';
    /**
     * Method to get the field label markup.
     *
     * @return  string  The field label markup.
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_BASE') or die;
JFormHelper::loadFieldClass('ordering');
/**
 * Supports an HTML select list of plugins
 *
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 * @since       1.6
 */
class JFormFieldPluginordering extends JFormFieldOrdering
{
    /**
     * The form field type.
     *
     * @var		string
     * @since   1.6
     */
    protected $type = 'Pluginordering';
    /**
     * Builds the query for the ordering list.
     *
     * @return  JDatabaseQuery  The query for the ordering form field
<?php

/**
 * List JoomFish languages
 *
 * @package 	CSVI
 * @author 		Roland Dalmulder
 * @link 		http://www.csvimproved.com
 * @copyright 	Copyright (C) 2006 - 2013 RolandD Cyber Produksi. All rights reserved.
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: csvijoomfishlanguage.php 2275 2013-01-03 21:08:43Z RolandD $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('CsviForm');
/**
 * Select list form field with JoomFish languages
 *
 * @package CSVI
 */
class JFormFieldCsviJoomfishLanguage extends JFormFieldCsviForm
{
    protected $type = 'CsviJoomfishLanguage';
    /**
     * Specify the options to load
     *
     * @copyright
     * @author 		RolandD
     * @todo
     * @see
Exemplo n.º 20
0
<?php

/**
 * @package     Sibdiet.Administrator
 * @subpackage  com_sibdiet
 * @checked     2014/07/01
 * @copyright   Copyright (C) 2012 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('predefinedradio');
/**
 * Form Field to load a list of genders
 *
 * @package     Joomla.Libraries
 * @subpackage  Form
 * @since       3.2
 */
class JFormFieldGendersRadio extends JFormFieldPredefinedRadio
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  3.2
     */
    public $type = 'GendersRadio';
    /**
     * Available genders
     *
     * @var  array
Exemplo n.º 21
0
<?php

/**
 * @package    FrameworkOnFramework
 * @copyright  Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('_JEXEC') or die;
JFormHelper::loadFieldClass('text');
/**
 * Form Field class for the FOF framework
 * Supports a one line text field.
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class FOFFormFieldText extends JFormFieldText implements FOFFormField
{
    protected $static;
    protected $repeatable;
    /** @var   FOFTable  The item being rendered in a repeatable form field */
    public $item;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
     *
     * @return  mixed  The property value or null.
Exemplo n.º 22
0
<?php

/**
 * Part of Component Userxtd files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
include_once JPATH_LIBRARIES . '/windwalker/src/init.php';
JForm::addFieldPath(WINDWALKER_SOURCE . '/Form/Fields');
JFormHelper::loadFieldClass('itemlist');
/**
 * Supports an HTML select list of categories
 */
class JFormFieldProfile_List extends JFormFieldItemlist
{
    /**
     * The form field type.
     *
     * @var string
     */
    public $type = 'Profile_List';
    /**
     * List name.
     *
     * @var string
     */
    protected $view_list = 'profiles';
    /**
 * ------------------------------------------------------------------------
 * JUDirectory for Joomla 2.5, 3.x
 * ------------------------------------------------------------------------
 *
 * @copyright      Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 * @author         JoomUltra Co., Ltd
 * @website        http://www.joomultra.com
 * @----------------------------------------------------------------------@
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
jimport('joomla.html.html');
jimport('joomla.form.formfield');
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('checkboxes');
class JFormFieldCategoriesAssignment extends JFormFieldCheckboxes
{
    protected $type = 'CategoriesAssignment';
    protected function getInput()
    {
        $class = $this->element['class'] ? ' class="checkboxes ' . (string) $this->element['class'] . '"' : ' class="checkboxes"';
        $html = '<fieldset id="' . $this->id . '"' . $class . '>';
        $html .= '<div class="btn-group pull-left">';
        $html .= '<button type="button"  class="btn btn-mini" onclick="jQuery(\'.assigned_cat\').each(function(el) { jQuery(this).prop(\'checked\', !jQuery(this).is(\':checked\')); });">';
        $html .= JText::_('JGLOBAL_SELECTION_INVERT') . '</button>';
        $html .= '<button type="button" class="btn btn-mini" onclick="jQuery(\'.assigned_cat\').each(function(el) { jQuery(this).prop(\'checked\', false); });">';
        $html .= JText::_('JGLOBAL_SELECTION_NONE') . '</button>';
        $html .= '<button type="button"  class="btn btn-mini" onclick="jQuery(\'.assigned_cat\').each(function(el) { jQuery(this).prop(\'checked\', true); });">';
        $html .= JText::_('JGLOBAL_SELECTION_ALL') . '</button>';
        $html .= '</div>';
Exemplo n.º 24
0
<?php

/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('rules');
/**
* This is an overload of the core Rules form field
* It address the issue where several rules cannot be used in the same configuration file
*/
class JFormFieldVmRules extends JFormFieldRules
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  11.1
     */
    public $type = 'VMRules';
    /**
     * Method to get the field input markup for Access Control Lists.
     * This is an overload of the core Rules form field
     * It address the issue where several rules cannot be used in the same configuration file
     */
    protected function getInput()
    {
Exemplo n.º 25
0
<?php

/** 
 *------------------------------------------------------------------------------
 * @package       CANVAS Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 ThemezArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       ThemezArt
 *                & t3-framework.org as base version
 * @Link:         http://themezart.com/canvas-framework 
 *------------------------------------------------------------------------------
 */
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('hidden');
// Import the com_menus helper.
require_once realpath(JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');
/**
 * Supports an HTML select list of menus
 *
 * @package     Joomla.Libraries
 * @subpackage  Form
 * @since       1.6
 */
class JFormFieldCANVASMegaMenu extends JFormFieldHidden
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  1.6
Exemplo n.º 26
0
<?php

/**
 * @package     Joomla.Libraries
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_BASE') or die;
JFormHelper::loadFieldClass('predefinedlist');
/**
 * Field to show a list of available user active statuses
 *
 * @package     Joomla.Libraries
 * @subpackage  Form
 * @since       3.2
 */
class JFormFieldUserActive extends JFormFieldPredefinedList
{
    /**
     * The form field type.
     *
     * @var		string
     * @since   3.2
     */
    protected $type = 'UserActive';
    /**
     * Available statuses
     *
     * @var  array
Exemplo n.º 27
0
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_webgallery
 *
 * @copyright   Copyright (C) 2012 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Generated by AKHelper - http://asikart.com
 */
// no direct access
defined('_JEXEC') or die;
include_once JPATH_ADMINISTRATOR . '/components/com_webgallery/includes/core.php';
JForm::addFieldPath(AKPATH_FORM . '/fields');
JFormHelper::loadFieldClass('Modal');
/**
 * Supports a modal picker.
 */
class JFormFieldItem_Modal extends JFormFieldModal
{
    /**
     * The form field type.
     *
     * @var string
     * @since    1.6
     */
    protected $type = 'Item_Modal';
    /**
     * List name.
     *
     * @var string 
<?php

/**
 * @package    FrameworkOnFramework
 * @subpackage form
 * @copyright   Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
JFormHelper::loadFieldClass('imagelist');
/**
 * Form Field class for the FOF framework
 * Media selection field.
 *
 * @package  FrameworkOnFramework
 * @since    2.0
 */
class FOFFormFieldImagelist extends JFormFieldImageList implements FOFFormField
{
    protected $static;
    protected $repeatable;
    /** @var   FOFTable  The item being rendered in a repeatable form field */
    public $item;
    /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
    public $rowid;
    /**
     * Method to get certain otherwise inaccessible properties from the form field object.
     *
     * @param   string  $name  The property name for which to the the value.
     *
<?php

/**
 * @copyright	Copyright (C) 2011 Cedric KEIFLIN alias ced1870
 * http://www.joomlack.fr
 * Module Maximenu CK
 * @license		GNU/GPL
 * */
defined('JPATH_BASE') or die;
jimport('joomla.filesystem.file');
jimport('joomla.form.formfield');
JFormHelper::loadFieldClass('cklist');

class JFormFieldCkhikashopcategory extends JFormFieldCklist {

    protected $type = 'ckhikashopcategory';

    protected function getOptions() {
        // if the component is not installed
        if (!JFolder::exists(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_hikashop')
                OR !JFile::exists(JPATH_ROOT . DS . 'modules' . DS . 'mod_maximenuck' . DS . 'helper_hikashop.php')) {
            // add the root item
            $option = new stdClass();
            $option->text = JText::_('MOD_MAXIMENUCK_HIKASHOP_NOTFOUND');
            $option->value = '0';
            $options[] = $option;
            // Merge any additional options in the XML definition.
            $options = array_merge(parent::getOptions(), $options);

            return $options;
        }
Exemplo n.º 30
0
Arquivo: Email.php Projeto: Joal01/fof
<?php

/**
 * @package     FOF
 * @copyright   2010-2015 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license     GNU GPL version 2 or later
 */
namespace FOF30\Form\Field;

use FOF30\Form\FieldInterface;
use FOF30\Form\Form;
use FOF30\Model\DataModel;
use JText;
defined('_JEXEC') or die;
\JFormHelper::loadFieldClass('email');
/**
 * Form Field class for the FOF framework
 * Supports a one line text field.
 */
class Email extends \JFormFieldEMail implements FieldInterface
{
    /**
     * @var  string  Static field output
     */
    protected $static;
    /**
     * @var  string  Repeatable field output
     */
    protected $repeatable;
    /**
     * The Form object of the form attached to the form field.