Merge pull request #4607 from samuelsov/CRM-15637
[civicrm-core.git] / CRM / Custom / Form / DeleteField.php
index 49543efc04a57b1f03c3fd2dd6043bbdd2b5defe..d7abf160312f37e21ee3aa4a3fbb536c8a29c1f7 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,14 +53,14 @@ 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');
 
 
@@ -69,18 +69,16 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
     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 +102,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 +115,3 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
 
   }
 }
-