CRM-15756, more fixes
authorkurund <kurund@civicrm.org>
Sat, 28 Feb 2015 20:51:30 +0000 (02:21 +0530)
committerkurund <kurund@civicrm.org>
Sat, 28 Feb 2015 20:51:30 +0000 (02:21 +0530)
----------------------------------------
* CRM-15756: Back-office Submit Credit Card Contribution form: card # validation is no longer working
  https://issues.civicrm.org/jira/browse/CRM-15756

CRM/Contribute/Form/Contribution.php

index da3cbdc61edea7afa44f334646181148db995d77..8dbf4882610cb82446b1ec569e1110e6f2c88ff8 100644 (file)
@@ -602,6 +602,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('billingPanes', $billingPanes);
     $this->assign('allPanes', $allPanes);
 
+    $this->addFormRule(array('CRM_Contribute_Form_Contribution', 'formRule'), $this);
+
     if ($this->_formType) {
       $this->assign('formType', $this->_formType);
       return;
@@ -884,8 +886,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       $financialType->freeze();
     }
 
-    $this->addFormRule(array('CRM_Contribute_Form_Contribution', 'formRule'), $this);
-
     // if contribution is related to membership or participant freeze Financial Type, Amount
     if ($this->_id && isset($this->_values['tax_amount'])) {
       $componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);