_fid = $this->get('fid'); $this->_title = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceField', $this->_fid, 'label', 'id' ); $this->assign('title', $this->_title); CRM_Utils_System::setTitle(ts('Confirm Price Field Delete')); } /** * Build the form object * * @param null * * @return void * @access public */ public function buildQuickForm() { $this->addButtons(array( array( 'type' => 'next', 'name' => ts('Delete Price Field'), 'isDefault' => TRUE, ), array( 'type' => 'cancel', 'name' => ts('Cancel'), ), ) ); } /** * Process the form when submitted * * @param null * * @return void * @access public */ public function postProcess() { if (CRM_Price_BAO_PriceField::deleteField($this->_fid)) { CRM_Core_Session::setStatus(ts('The Price Field \'%1\' has been deleted.', array(1 => $this->_title)), '', 'success'); } } }