Mage_Adminhtml_Block_Checkout_Agreement_Edit_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Checkout_Agreement_Edit_Form:

Mage_Adminhtml_Block_Widget_Form Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()

Protected Member Functions

 _prepareForm ()


Detailed Description

Definition at line 35 of file Form.php.


Constructor & Destructor Documentation

__construct (  ) 

Init class

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 41 of file Form.php.

00042     {
00043         parent::__construct();
00044 
00045         $this->setId('checkoutAgreementForm');
00046         $this->setTitle(Mage::helper('checkout')->__('Terms and Conditions Information'));
00047     }


Member Function Documentation

_prepareForm (  )  [protected]

return Mage_Adminhtml_Block_Widget_Form

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 53 of file Form.php.

00054     {
00055         $model  = Mage::registry('checkout_agreement');
00056         $form   = new Varien_Data_Form(array(
00057             'id'        => 'edit_form',
00058             'action'    => $this->getData('action'),
00059             'method'    => 'post'
00060         ));
00061 
00062         $fieldset   = $form->addFieldset('base_fieldset', array(
00063             'legend'    => Mage::helper('checkout')->__('Terms and Conditions Information'),
00064             'class'     => 'fieldset-wide',
00065         ));
00066 
00067         if ($model->getId()) {
00068             $fieldset->addField('agreement_id', 'hidden', array(
00069                 'name' => 'agreement_id',
00070             ));
00071         }
00072         $fieldset->addField('name', 'text', array(
00073             'name'      => 'name',
00074             'label'     => Mage::helper('checkout')->__('Condition Name'),
00075             'title'     => Mage::helper('checkout')->__('Condition Name'),
00076             'required'  => true,
00077         ));
00078 
00079         $fieldset->addField('is_active', 'select', array(
00080             'label'     => Mage::helper('checkout')->__('Status'),
00081             'title'     => Mage::helper('checkout')->__('Status'),
00082             'name'      => 'is_active',
00083             'required'  => true,
00084             'options'   => array(
00085                 '1' => Mage::helper('checkout')->__('Enabled'),
00086                 '0' => Mage::helper('checkout')->__('Disabled'),
00087             ),
00088         ));
00089 
00090         $fieldset->addField('is_html', 'select', array(
00091             'label'     => Mage::helper('checkout')->__('Show Content as'),
00092             'title'     => Mage::helper('checkout')->__('Show Content as'),
00093             'name'      => 'is_html',
00094             'required'  => true,
00095             'options'   => array(
00096                 0 => Mage::helper('checkout')->__('Text'),
00097                 1 => Mage::helper('checkout')->__('HTML'),
00098             ),
00099         ));
00100 
00101         if (!Mage::app()->isSingleStoreMode()) {
00102             $fieldset->addField('store_id', 'multiselect', array(
00103                 'name'      => 'stores[]',
00104                 'label'     => Mage::helper('checkout')->__('Store View'),
00105                 'title'     => Mage::helper('checkout')->__('Store View'),
00106                 'required'  => true,
00107                 'values'    => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
00108             ));
00109         }
00110         else {
00111             $fieldset->addField('store_id', 'hidden', array(
00112                 'name'      => 'stores[]',
00113                 'value'     => Mage::app()->getStore(true)->getId()
00114             ));
00115             $model->setStoreId(Mage::app()->getStore(true)->getId());
00116         }
00117 
00118         $fieldset->addField('checkbox_text', 'editor', array(
00119             'name'      => 'checkbox_text',
00120             'label'     => Mage::helper('checkout')->__('Checkbox text'),
00121             'title'     => Mage::helper('checkout')->__('Checkbox text'),
00122             'rows'      => '5',
00123             'cols'      => '30',
00124             'wysiwyg'   => false,
00125             'required'  => true,
00126         ));
00127 
00128         $fieldset->addField('content', 'editor', array(
00129             'name'      => 'content',
00130             'label'     => Mage::helper('checkout')->__('Content'),
00131             'title'     => Mage::helper('checkout')->__('Content'),
00132             'style'     => 'height:24em;',
00133             'wysiwyg'   => false,
00134             'required'  => true,
00135         ));
00136 
00137         $fieldset->addField('content_height', 'text', array(
00138             'name'      => 'content_height',
00139             'label'     => Mage::helper('checkout')->__('Content Height (css)'),
00140             'title'     => Mage::helper('checkout')->__('Content Height'),
00141             'maxlength' => 25,
00142             'class'     => 'validate-css-length',
00143         ));
00144 
00145         $form->setValues($model->getData());
00146         $form->setUseContainer(true);
00147         $this->setForm($form);
00148 
00149         return parent::_prepareForm();
00150     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:46 2009 for Magento by  doxygen 1.5.8