Example #1
0
 public function render(Varien_Object $row)
 {
     $row->setTypes(explode(',', $row->getTypes()));
     $out = '';
     foreach (AW_Helpdesk3_Model_Source_Gateway_Mail_RejectPattern::toOptionArray() as $type) {
         if (in_array($type['value'], $row->getTypes())) {
             $out .= $type['label'] . '<br/>';
         }
     }
     return $out;
 }
Example #2
0
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))), 'method' => 'post'));
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('aw_hdu3_rejecting_pattern_form', array('legend' => $this->__('General Information')));
     $fieldset->addField('title', 'text', array('name' => 'title', 'label' => $this->__('Title'), 'required' => true));
     $fieldset->addField('is_active', 'select', array('name' => 'is_active', 'label' => $this->__('Status'), 'required' => true, 'values' => AW_Helpdesk3_Model_Source_Status::toOptionArray()));
     $fieldset->addField('types', 'multiselect', array('name' => 'types', 'label' => $this->__('Scope'), 'required' => true, 'values' => AW_Helpdesk3_Model_Source_Gateway_Mail_RejectPattern::toOptionArray()));
     $fieldset->addField('pattern', 'text', array('name' => 'pattern', 'label' => $this->__('Pattern'), 'required' => true));
     $form->setValues(Mage::registry('current_pattern')->getData());
     return parent::_prepareForm();
 }