/**
  * Process the form
  *
  * @param null
  *
  * @return void
  * @access public
  */
 public function postProcess()
 {
     if ($this->_action == CRM_Core_Action::DELETE) {
         $fieldValues = array('price_field_id' => $this->_fid);
         $wt = CRM_Utils_Weight::delWeight('CRM_Price_DAO_FieldValue', $this->_oid, $fieldValues);
         $label = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_FieldValue', $this->_oid, 'label', 'id');
         if (CRM_Price_BAO_FieldValue::del($this->_oid)) {
             CRM_Core_Session::setStatus(ts('%1 option has been deleted.', array(1 => $label)));
         }
         return;
     } else {
         $params = $ids = array();
         $params = $this->controller->exportValues('Option');
         $fieldLabel = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Field', $this->_fid, 'label');
         $params['amount'] = CRM_Utils_Rule::cleanMoney(trim($params['amount']));
         $params['price_field_id'] = $this->_fid;
         $params['is_default'] = CRM_Utils_Array::value('is_default', $params, FALSE);
         $ids = array();
         if ($this->_oid) {
             $ids['id'] = $this->_oid;
         }
         $optionValue = CRM_Price_BAO_FieldValue::create($params, $ids);
         CRM_Core_Session::setStatus(ts('The option \'%1\' has been saved.', array(1 => $params['label'])));
     }
 }