3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class is to build the form for Deleting Group
21 class CRM_Price_Form_DeleteField
extends CRM_Core_Form
{
31 * The title of the group being deleted.
38 * Set up variables to build the form.
43 public function preProcess() {
44 $this->_fid
= $this->get('fid');
46 $this->_title
= CRM_Core_DAO
::getFieldValue('CRM_Price_DAO_PriceField',
51 $this->assign('title', $this->_title
);
53 $this->setTitle(ts('Confirm Price Field Delete'));
57 * Build the form object.
61 public function buildQuickForm() {
65 'name' => ts('Delete Price Field'),
70 'name' => ts('Cancel'),
76 * Process the form when submitted.
80 public function postProcess() {
81 if (CRM_Price_BAO_PriceField
::deleteField($this->_fid
)) {
82 CRM_Core_Session
::setStatus(ts('The Price Field \'%1\' has been deleted.', [1 => $this->_title
]), '', 'success');