CRM-13926 : FIX
[civicrm-core.git] / CRM / Event / Form / Registration / Register.php
index 719a0a5a5cbb5830f89f131dc19ed40d1c3573e6..3e785fdf571b0396327a3b4cd001a07272e01fb5 100644 (file)
@@ -351,8 +351,9 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
       if (!$this->_allowConfirmation || $this->_additionalParticipantIds) {
         // Hardcode maximum number of additional participants here for now. May need to make this configurable per event.
         // Label is value + 1, since the code sees this is ADDITIONAL participants (in addition to "self")
-        $additionalOptions = array('' => ts('1'), 1 => ts('2'), 2 => ts('3'), 3 => ts('4'), 4 => ts('5'),
-          5 => ts('6'), 6 => ts('7'), 7 => ts('8'), 8 => ts('9'), 9 => ts('10'),
+        $additionalOptions = array(
+          '' => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5',
+          5 => '6', 6 => '7', 7 => '8', 8 => '9', 9 => '10',
         );
         $element = $this->add('select', 'additional_participants',
           ts('How many people are you registering?'),
@@ -840,7 +841,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
     }
 
     if ($self->_values['event']['is_monetary']) {
-      if ($fields['amount'] > 0 && !isset($fields['payment_processor'])) {
+      if (empty($self->_requireApproval) && $fields['amount'] > 0 && !isset($fields['payment_processor'])) {
         $errors['payment_processor'] = ts('Please select a Payment Method');
       }
       if (is_array($self->_paymentProcessor)) {