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); $generalFieldset = $form->addFieldset('aw_hdu3_priority_form', array('legend' => $this->__('General Details'))); $_cfg = array('label' => $this->__('Status'), 'name' => 'status', 'values' => AW_Helpdesk3_Model_Source_Status::toOptionArray()); /** * @var $currentPriority AW_Helpdesk3_Model_Ticket_Priority */ $currentPriority = Mage::registry('current_priority'); if ($currentPriority->getIsSystem()) { $_cfg['note'] = $this->__('System Priority cannot be disabled or deleted'); if ($currentPriority->isEnabled()) { $_cfg['disabled'] = true; } } $generalFieldset->addField('status', 'select', $_cfg); $generalFieldset->addField('font_color', 'text', array('label' => $this->__('Font Color'), 'name' => 'font_color')); $generalFieldset->addField('background_color', 'text', array('label' => $this->__('Background Color'), 'name' => 'background_color')); Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('aw_hdu3/adminhtml_form_fieldset_renderer_labelElement', '', array('label_values' => Mage::registry('current_priority')->getLabelValues()))); $titlesFieldset = $form->addFieldset('aw_hdu3_priority_form_titles', array('legend' => $this->__('Manage Titles'))); $titlesFieldset->addField('id', 'hidden', array('name' => 'id')); $form->setValues(Mage::registry('current_priority')->getData()); return parent::_prepareForm(); }
protected function _prepareMassaction() { $this->setMassactionIdField('statusIds'); $this->getMassactionBlock()->setFormFieldName('statusIds'); $this->getMassactionBlock()->addItem('status', array('label' => $this->__('Change status'), 'url' => $this->getUrl('*/*/massStatus'), 'additional' => array('visibility' => array('name' => 'status', 'type' => 'select', 'class' => 'required-entry', 'label' => $this->__('Status'), 'values' => AW_Helpdesk3_Model_Source_Status::toOptionArray())))); return $this; }
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('template_details', array('legend' => $this->__('Template details'))); $fieldset->addField('is_active', 'select', array('label' => $this->__('Status'), 'name' => 'is_active', 'values' => AW_Helpdesk3_Model_Source_Status::toOptionArray())); $fieldset->addField('title', 'text', array('label' => $this->__('Title'), 'name' => 'title', 'required' => true)); $fieldset->addField('store_ids', 'multiselect', array('name' => 'store_ids[]', 'label' => $this->__('Store'), 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true), 'required' => true)); $fieldset->addField('content', 'editor', array('label' => $this->__('Content'), 'name' => 'content', 'style' => 'width:500px; height:400px;', 'config' => $this->_getWysiwygConfig())); $form->setValues(Mage::registry('current_template')->getData()); return parent::_prepareForm(); }
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(); }
protected function _initForm() { $form = new Varien_Data_Form(); $fieldset = $form->addFieldset('aw_hdu3_department_general_form', array('legend' => $this->__('Department Details'))); $_cfg = array('label' => $this->__('Status'), 'name' => 'status', 'values' => AW_Helpdesk3_Model_Source_Status::toOptionArray()); /** * @var $currentDepartment AW_Helpdesk3_Model_Department */ $currentDepartment = Mage::registry('current_department'); if ($currentDepartment->isPrimary()) { $_cfg['note'] = $this->__('Primary Department cannot be disabled or deleted'); if ($currentDepartment->isEnabled()) { $_cfg['disabled'] = true; } } $fieldset->addField('status', 'select', $_cfg); $fieldset->addField('store_ids', 'multiselect', array('name' => 'store_ids[]', 'label' => $this->__('Visible on'), 'image' => $this->getSkinUrl('images/grid-cal.gif'), 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true))); $fieldset->addField('title', 'text', array('label' => $this->__('Title'), 'name' => 'title', 'required' => true)); $fieldset->addField('sort_order', 'text', array('label' => $this->__('Sort Order'), 'name' => 'sort_order')); $form->setValues(Mage::registry('current_department')->getData()); $this->setForm($form); }