00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Adminhtml_Block_Poll_Answer_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
00036 {
00037
00038 public function __construct()
00039 {
00040 parent::__construct();
00041
00042 $this->_objectId = 'id';
00043 $this->_controller = 'poll_answer';
00044
00045 if( $this->getRequest()->getParam($this->_objectId) ) {
00046 $answerData = Mage::getModel('poll/poll_answer')
00047 ->load($this->getRequest()->getParam($this->_objectId));
00048 Mage::register('answer_data', $answerData);
00049 }
00050
00051 $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/poll/edit', array('id' => $answerData->getPollId(), 'tab' => 'answers_section')) . '\');');
00052 $this->_updateButton('save', 'label', Mage::helper('poll')->__('Save Answer'));
00053 $this->_updateButton('delete', 'label', Mage::helper('poll')->__('Delete Answer'));
00054 }
00055
00056 public function getHeaderText()
00057 {
00058 return Mage::helper('poll')->__("Edit Answer '%s'", $this->htmlEscape(Mage::registry('answer_data')->getAnswerTitle()));
00059 }
00060
00061 }