Merge pull request #4880 from totten/master-cs3
[civicrm-core.git] / CRM / Custom / Form / DeleteField.php
index 49543efc04a57b1f03c3fd2dd6043bbdd2b5defe..b531dc0ddaeaf02910d0bd1344294f1b60db227d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -39,7 +39,7 @@
 class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
 
   /**
-   * the group id
+   * The group id
    *
    * @var int
    */
@@ -53,34 +53,31 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
   protected $_title;
 
   /**
-   * set up variables to build the form
+   * Set up variables to build the form
    *
    * @param null
    *
    * @return void
    * @acess protected
    */
-  function preProcess() {
+  public function preProcess() {
     $this->_id = $this->get('id');
 
-
     $defaults = array();
     $params = array('id' => $this->_id);
     CRM_Core_BAO_CustomField::retrieve($params, $defaults);
 
     $this->_title = CRM_Utils_Array::value('label', $defaults);
-    $this->assign('title', $this->_title);
 
-    CRM_Utils_System::setTitle(ts('Confirm Custom Field Delete'));
+    CRM_Utils_System::setTitle(ts('Delete %1', array(1 => $this->_title)));
   }
 
   /**
-   * Function to actually build the form
+   * Build the form object
    *
    * @param null
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
 
@@ -104,7 +101,6 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
    * @param null
    *
    * @return void
-   * @access public
    */
   public function postProcess() {
     $field = new CRM_Core_DAO_CustomField();
@@ -118,4 +114,3 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
 
   }
 }
-