setId('order_status_state'); } /** * Prepare form fields * * @return Mage_Adminhtml_Block_Widget_Form */ protected function _prepareForm() { $form = new Varien_Data_Form(array( 'id' => 'edit_form', 'method' => 'post' )); $fieldset = $form->addFieldset('base_fieldset', array( 'legend' => Mage::helper('sales')->__('Assignment Information') )); $statuses = Mage::getResourceModel('sales/order_status_collection') ->toOptionArray(); array_unshift($statuses, array('value' => '', 'label' => '')); $states = Mage::getSingleton('sales/order_config')->getStates(); $states = array_merge(array('' => ''), $states); $fieldset->addField('status', 'select', array( 'name' => 'status', 'label' => Mage::helper('sales')->__('Order Status'), 'class' => 'required-entry', 'values' => $statuses, 'required' => true, ) ); $fieldset->addField('state', 'select', array( 'name' => 'state', 'label' => Mage::helper('sales')->__('Order State'), 'class' => 'required-entry', 'values' => $states, 'required' => true, ) ); $fieldset->addField('is_default', 'checkbox', array( 'name' => 'is_default', 'label' => Mage::helper('sales')->__('Use Order Status As Default'), 'value' => 1, ) ); $form->setAction($this->getUrl('*/sales_order_status/assignPost')); $form->setUseContainer(true); $this->setForm($form); return parent::_prepareForm(); } }