Ejemplo n.º 1
0
 public static function getValueArray1()
 {
     $data_array = array();
     foreach (MG_Helpdesk_Block_Adminhtml_Notifytemplate_Grid::getOptionArray1() as $k => $v) {
         $data_array[] = array('value' => $k, 'label' => $v);
     }
     return $data_array;
 }
Ejemplo n.º 2
0
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $this->setForm($form);
     $fieldset = $form->addFieldset("helpdesk_form", array("legend" => Mage::helper("helpdesk")->__("Template Options")));
     /*	$fieldset->addField("notifytemplate_id", "text", array(
     			"label" => Mage::helper("helpdesk")->__("NotifyTemplate Id"),
     			"name" => "notifytemplate_id",
     			)); */
     $fieldset->addField("type_id", "select", array("label" => Mage::helper("helpdesk")->__("Type Id"), "name" => "type_id", 'values' => MG_Helpdesk_Block_Adminhtml_Notifytemplate_Grid::getValueArray1()));
     $fieldset->addField("template", "textarea", array("label" => Mage::helper("helpdesk")->__("Template"), "name" => "template"));
     if (Mage::getSingleton("adminhtml/session")->getNotifytemplateData()) {
         $form->setValues(Mage::getSingleton("adminhtml/session")->getNotifytemplateData());
         Mage::getSingleton("adminhtml/session")->setNotifytemplateData(null);
     } elseif (Mage::registry("notifytemplate_data")) {
         $form->setValues(Mage::registry("notifytemplate_data")->getData());
     }
     return parent::_prepareForm();
 }