protected function _prepareLayout() { $this->setChild('add_select_row_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add New Row'), 'class' => 'add add-select-row', 'id' => 'add_select_row_button_{{option_id}}'))); $this->setChild('delete_select_row_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Row'), 'class' => 'delete delete-select-row icon-btn'))); $this->setChild('add_image_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => '{{image_button_label}}', 'class' => 'add', 'id' => 'new-option-file-{{option_id}}', 'onclick' => 'productOptionTypeText.createFileField(this.id)'))); return parent::_prepareLayout(); }
public function __construct() { parent::__construct(); $isProductEdit = Mage::helper('formbuilder')->isProductEdit(); if (!$isProductEdit) { $this->setTemplate('formbuilder/catalog/product/edit/options/type/text.phtml'); } }