Public Member Functions | |
getContinueUrl () | |
Protected Member Functions | |
_prepareLayout () | |
_prepareForm () |
Definition at line 34 of file Settings.php.
_prepareForm | ( | ) | [protected] |
Prepare form before rendering HTML
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 49 of file Settings.php.
00050 { 00051 $form = new Varien_Data_Form(); 00052 $fieldset = $form->addFieldset('settings', array('legend'=>Mage::helper('catalog')->__('Create Product Settings'))); 00053 00054 $entityType = Mage::registry('product')->getResource()->getEntityType(); 00055 00056 $fieldset->addField('attribute_set_id', 'select', array( 00057 'label' => Mage::helper('catalog')->__('Attribute Set'), 00058 'title' => Mage::helper('catalog')->__('Attribute Set'), 00059 'name' => 'set', 00060 'value' => $entityType->getDefaultAttributeSetId(), 00061 'values'=> Mage::getResourceModel('eav/entity_attribute_set_collection') 00062 ->setEntityTypeFilter($entityType->getId()) 00063 ->load() 00064 ->toOptionArray() 00065 )); 00066 00067 $fieldset->addField('product_type', 'select', array( 00068 'label' => Mage::helper('catalog')->__('Product Type'), 00069 'title' => Mage::helper('catalog')->__('Product Type'), 00070 'name' => 'type', 00071 'value' => '', 00072 'values'=> Mage::getModel('catalog/product_type')->getOptionArray() 00073 )); 00074 00075 $fieldset->addField('continue_button', 'note', array( 00076 'text' => $this->getChildHtml('continue_button'), 00077 )); 00078 00079 $this->setForm($form); 00080 }
_prepareLayout | ( | ) | [protected] |
Prepare block children and data
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 36 of file Settings.php.
00037 { 00038 $this->setChild('continue_button', 00039 $this->getLayout()->createBlock('adminhtml/widget_button') 00040 ->setData(array( 00041 'label' => Mage::helper('catalog')->__('Continue'), 00042 'onclick' => "setSettings('".$this->getContinueUrl()."','attribute_set_id','product_type')", 00043 'class' => 'save' 00044 )) 00045 ); 00046 return parent::_prepareLayout(); 00047 }
getContinueUrl | ( | ) |
Definition at line 82 of file Settings.php.
00083 { 00084 return $this->getUrl('*/*/new', array( 00085 '_current' => true, 00086 'set' => '{{attribute_set}}', 00087 'type' => '{{type}}' 00088 )); 00089 }