CRM-5039 Minor Fixes
authoratif-shaikh <shaikh388@gmail.com>
Tue, 24 Feb 2015 13:40:21 +0000 (19:10 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Tue, 24 Feb 2015 13:40:21 +0000 (19:10 +0530)
----------------------------------------
* CRM-5039: Events don't always limit registrations to "max participants" setting
  https://issues.civicrm.org/jira/browse/CRM-5039

CRM/Event/Form/Registration.php
CRM/Event/Form/Registration/AdditionalParticipant.php
CRM/Event/Form/Registration/Confirm.php

index 407b1a632c70ba45156a93c20587f6979bf699cf..7cf1cfbddbdf5c8c4ad1a3551f3f675ea6946f4c 100644 (file)
@@ -1246,7 +1246,7 @@ WHERE  v.option_group_id = g.id
           if (in_array($value[0], $optIds)) {
             foreach ($element->_options as $option) {
               if ($option['attr']['value'] === "crm_disabled_opt-{$value[0]}") {
-                $placeholder = html_entity_decode($option['text']);
+                $placeholder = html_entity_decode($option['text'], ENT_QUOTES, "UTF-8");
                 $element->updateAttributes(array('placeholder' => $placeholder));
                 break;
               }
index 7c86b01c618866b7b6ba6f43723f713ce22a9474..097e7aaacb6630eba9f20110ed83b80439a9a678 100644 (file)
@@ -564,7 +564,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
     CRM_Core_Form::validateMandatoryFields($self->_fields, $fields, $errors);
 
     // validate supplied payment instrument values (e.g. credit card number and cvv)
-    $payment_processor_id = $self->params[0]['payment_processor_id'];
+    $payment_processor_id = $self->_params[0]['payment_processor'];
     CRM_Core_Payment_Form::validatePaymentInstrument($payment_processor_id, $self->_params[0], $errors, $self);
 
     if (!empty($errors)) {
@@ -579,6 +579,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
         }
       }
     }
+    return TRUE;
   }
 
   /**
index 9f5e53fd4c6bfa860c7f1b38494cf05c196fb390..8609d6d556c5bf23be68be0e7bc6b8f22d67c750 100644 (file)
@@ -418,7 +418,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
       ) {
       $priceSetErrors = self::validatePriceSet($self, $self->_params);
       if (!empty($priceSetErrors)) {
-        CRM_Core_Session::setStatus(ts('You have been returned to the start of the registration process and any sold out events have been removed from your selections. You will not be able to continue until you review your booking and select different events if you wish. The following events were sold out:'), ts('Unfortunately some of your options have now sold out for one or more participants.'), 'error');
+        CRM_Core_Session::setStatus(ts('You have been returned to the start of the registration process and any sold out events have been removed from your selections. You will not be able to continue until you review your booking and select different events if you wish.'), ts('Unfortunately some of your options have now sold out for one or more participants.'), 'error');
         CRM_Core_Session::setStatus(ts('Please note that the options which are marked or selected are sold out for participant being viewed.'), ts('Sold out:'), 'error');
         CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/event/register', "_qf_Register_display=true&qfKey={$fields['qfKey']}"));
       }