Merge pull request #5894 from eileenmcnaughton/CRM-16555
authorEileen McNaughton <eileen@mcnaughty.com>
Thu, 4 Jun 2015 04:53:20 +0000 (16:53 +1200)
committerEileen McNaughton <eileen@mcnaughty.com>
Thu, 4 Jun 2015 04:53:20 +0000 (16:53 +1200)
CRM-16555 - Make Payment form credit / debit card changing available …

1  2 
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/Contribution/Main.php
CRM/Event/Form/Registration/Register.php

Simple merge
index 41935ff00b2e215681d8ec2df70aa2e4cbf3d1a3,2350155c52504a9a03b9439a73050a43e98d2066..143b54cd373f4b9186a293061819c2db3f4f6d56
@@@ -953,11 -953,17 +955,11 @@@ class CRM_Contribute_Form_Contribution_
        }
      }
  
 -    if (!empty($fields['is_recur'])) {
 -      if ($fields['frequency_interval'] <= 0) {
 -        $errors['frequency_interval'] = ts('Please enter a number for how often you want to make this recurring contribution (EXAMPLE: Every 3 months).');
 -      }
 -      if ($fields['frequency_unit'] == '0') {
 -        $errors['frequency_unit'] = ts('Please select a period (e.g. months, years ...) for how often you want to make this recurring contribution (EXAMPLE: Every 3 MONTHS).');
 -      }
 -    }
 +    //CRM-16285 - Function to handle validation errors on form, for recurring contribution field.
 +    CRM_Contribute_BAO_ContributionRecur::validateRecurContribution($fields, $files, $self, $errors);
  
      if (!empty($fields['is_recur']) &&
-       CRM_Utils_Array::value('payment_processor', $fields) == 0
+       CRM_Utils_Array::value('payment_processor_id', $fields) == 0
      ) {
        $errors['_qf_default'] = ts('You cannot set up a recurring contribution if you are not paying online by credit card.');
      }