Skip to content
Snippets Groups Projects
Commit 3ba0517b authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V1.2: Removed custm formfield (not needed), cleanup of xml

parent b1d12e13
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<filename>index.html</filename> <filename>index.html</filename>
<folder>language</folder> <folder>language</folder>
<folder>elements</folder> <folder>elements</folder>
<folder>fields</folder>
</files> </files>
<languages folder="language"> <languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_buyer_assign_group.ini</language> <language tag="en-GB">en-GB/en-GB.plg_vmcustom_buyer_assign_group.ini</language>
...@@ -24,9 +23,9 @@ ...@@ -24,9 +23,9 @@
<vmconfig> <vmconfig>
<fields name="params" addfieldpath="/administrator/components/com_virtuemart/fields/"> <fields name="params" addfieldpath="/administrator/components/com_virtuemart/fields/">
<fieldset name="order_status" addfieldpath="/plugins/vmcustom/buyer_assign_group/fields/"> <fieldset name="order_status" addfieldpath="/plugins/vmcustom/buyer_assign_group/fields/">
<field name="purchased_status" type="orderstatus" default="C,S" multiple="multiple" label="VMCUSTOM_BUYER_GROUP_STATUS" description="VMCUSTOM_BUYER_GROUP_STATUS_DESC"/> <field name="purchased_status" type="orderstatus" default="C,S" multiple="multiple" label="VMCUSTOM_BUYER_GROUP_STATUS" description="VMCUSTOM_BUYER_GROUP_STATUS_DESC"/>
</fieldset> </fieldset>
</fields> </fields>
</vmconfig> </vmconfig>
......
<?php
defined ('_JEXEC') or die();
/**
*
* @package VirtueMart
* @subpackage Plugins - Elements
* @author Valérie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2011 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id:$
*/
// if (!class_exists('VmConfig')) require(JPATH_VM_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
// if(!class_exists('VmModel')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmmodel.php');
/*
* This class is used by VirtueMart Payment or Shipment Plugins
* which uses JParameter
* So It should be an extension of JElement
* Those plugins cannot be configured througth the Plugin Manager anyway.
*/
// class JElementVmOrderStates extends JElement {
//
// /**
// * Element name
// *
// * @access protected
// * @var string
// */
// var $_name = 'OrderStates';
//
// function fetchElement ($name, $value, &$node, $control_name) {
// $statusModel = VmModel::getModel('OrderStatus');
// $fields = $statusModel->getOrderStatusNames();
// $class = 'class="inputbox" multiple="multiple" size="6" ';
//
// return JHTML::_ ('select.genericlist', $fields, $control_name . '[' . $name . '][]', $class, 'order_status_code', 'order_status_name', $value, $control_name . $name, true);
// }
// }
// <?php
// defined ('_JEXEC') or die();
/**
*
* @package VirtueMart
* @subpackage Plugins - Elements
* @author Valérie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2011 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id:$
*/
class JFormFieldVmOrderStates extends JFormField {
var $type = 'VmOrderStates';
function getInput () {
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
if (!class_exists ('VmModel')) {
require(VMPATH_ADMIN . DS . 'helpers' . DS . 'vmmodel.php');
}
VmConfig::loadConfig ();
VmConfig::loadJLang('com_virtuemart');
$key = ($this->element['key_field'] ? $this->element['key_field'] : 'value');
$val = ($this->element['value_field'] ? $this->element['value_field'] : $this->name);
$model = VmModel::getModel ('Orderstatus');
$orderStatus = $model->getOrderStatusList ();
foreach ($orderStatus as $orderState) {
$orderState->order_status_name = vmText::_ ($orderState->order_status_name);
}
return JHtml::_ ('select.genericlist', $orderStatus, $this->name, 'class="inputbox" multiple="true" size="6"', 'order_status_code', 'order_status_name', $this->value, $this
->id);
}
}
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment