From 2ae4d1032132cfd14823d70495704ab56a07012d Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Tue, 24 Feb 2015 19:10:21 +0530 Subject: [PATCH] CRM-5039 Minor Fixes ---------------------------------------- * 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 | 2 +- CRM/Event/Form/Registration/AdditionalParticipant.php | 3 ++- CRM/Event/Form/Registration/Confirm.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 407b1a632c..7cf1cfbddb 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -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; } diff --git a/CRM/Event/Form/Registration/AdditionalParticipant.php b/CRM/Event/Form/Registration/AdditionalParticipant.php index 7c86b01c61..097e7aaacb 100644 --- a/CRM/Event/Form/Registration/AdditionalParticipant.php +++ b/CRM/Event/Form/Registration/AdditionalParticipant.php @@ -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; } /** diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 9f5e53fd4c..8609d6d556 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -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']}")); } -- 2.25.1