1: <?php
2: /*
3:
4: *
5: * NOTICE OF LICENSE
6: *
7: * This source file is subject to the Open Software License (OSL 3.0)
8: * or OpenGPL v3 license (GNU Public License V3.0)
9: * that is bundled with this package in the file LICENSE.txt.
10: * It is also available through the world-wide-web at this URL:
11: * http://opensource.org/licenses/osl-3.0.php
12: * or
13: * http://www.gnu.org/licenses/gpl-3.0.txt
14: * If you did not receive a copy of the license and are unable to
15: * obtain it through the world-wide-web, please send an email
16: * to info@e-abi.ee so we can send you a copy immediately.
17: *
18: * DISCLAIMER
19: *
20: * Do not edit or add to this file if you wish to upgrade this module to newer
21: * versions in the future.
22: *
23: * @category Eabi
24: * @package Eabi_Dpd
25: * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27: * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28: * @author Matis Halmann
29: *
30:
31: */
32:
33: /**
34: * <p>Renders list of available action buttons in Magento admin > System > Configuration > Eabi Livehandler > Admin Order Grid Helper configuration menu</p>
35: * <p>Each button refers to subclass of <b>Eabi_Livehandler_Model_Action_Abstract</b> and contains following:</p>
36: * <ul>
37: <li><b>button_name</b> - name of the button relative to eabi_livehandler/action_<button-name> or full magento model name</li>
38: <li><b>sort_order</b> - buttons in the order info display are sorted ascending order</li>
39: <li><b>disabled</b> - 0 means button is enabled, 1 means button is disabled</li>
40: </ul>
41: *
42: * @author Matis
43: */
44: class Eabi_Livehandler_Block_Adminhtml_Config_Form_Field_Button extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
45:
46: public function __construct() {
47: $this->addColumn('button_name', array(
48: 'label' => Mage::helper('eabi_livehandler')->__('Button name'),
49: 'style' => 'width:120px',
50: /* 'class' => 'validate-code',*/
51: ));
52: $this->addColumn('sort_order', array(
53: 'label' => Mage::helper('adminhtml')->__('Sort order'),
54: 'style' => 'width:120px',
55: 'class' => 'validate-digits',
56: ));
57: $this->addColumn('disabled', array(
58: 'label' => Mage::helper('adminhtml')->__('Disabled'),
59: 'style' => 'width:120px',
60: 'class' => 'validate-digits-range digits-range-0-1',
61: ));
62: $this->_addAfter = false;
63: $this->_addButtonLabel = Mage::helper('eabi_livehandler')->__('Add button');
64: parent::__construct();
65: }
66:
67: }
68:
69: