/** * Prepare block Layout * */ protected function _prepareLayout() { parent::_prepareLayout(); $this->setChild('upload_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('id' => '', 'label' => Mage::helper('adminhtml')->__('Upload Files'), 'type' => 'button', 'onclick' => 'Downloadable.massUploadByType(\'links\');Downloadable.massUploadByType(\'linkssample\')'))); $this->_addElementIdsMapping(array('container' => $this->getHtmlId() . '-new', 'delete' => $this->getHtmlId() . '-delete')); }
/** * Prepare layout, change button and set front-end element ids mapping * * @return $this */ protected function _prepareLayout() { parent::_prepareLayout(); $this->_addElementIdsMapping(array('container' => $this->getHtmlId() . '-new', 'idToReplace' => $this->getHtmlId())); return $this; }