CRM-14199 Enhancement - Incorrect Math in Import routines
[civicrm-core.git] / CRM / Contribute / Form.php
index d2596921d2dfc54818ab936a7e89fe4b89ddce7d..1b97fa906b53b09fe579dbeb07b36e803a469ea5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  */
 
 /**
- * This class generates form components generic to Mobile provider
+ * This class generates form components generic to Contribution admin
  *
  */
-class CRM_Contribute_Form extends CRM_Core_Form {
+class CRM_Contribute_Form extends CRM_Admin_Form {
 
   /**
-   * The id of the object being edited / created
-   *
-   * @var int
-   */
-  protected $_id;
-
-  /**
-   * The name of the BAO object for this form
-   *
-   * @var string
-   */
-  protected $_BAOName;
-
-  function preProcess() {
-    $this->_id = $this->get('id');
-    $this->_BAOName = $this->get('BAOName');
-  }
-
-  /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @access public
    *
-   * @return void
+   * @return array
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     $defaults = array();
-    $params = array();
 
     if (isset($this->_id)) {
       $params = array('id' => $this->_id);
@@ -101,40 +80,4 @@ class CRM_Contribute_Form extends CRM_Core_Form {
     return $defaults;
   }
 
-  /**
-   * Function to actually build the form
-   *
-   * @return void
-   * @access public
-   */
-  public function buildQuickForm() {
-    $this->addButtons(array(
-        array(
-          'type' => 'next',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
-
-    if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
-    }
-  }
 }
-