From 1b9aa3aa55709d751bcfbe0df95bcd4404d04a77 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Mon, 11 May 2020 19:03:20 -0400 Subject: [PATCH] Proceeding to confirmation page should be a "next" button not a check --- CRM/Contribute/Form/Contribution/Main.php | 6 +++++- CRM/Event/Form/Registration/Register.php | 19 +++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 12cb2813df..b55883cbee 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -479,10 +479,14 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu if (!($allAreBillingModeProcessors && !$this->_values['is_pay_later'])) { $submitButton = [ 'type' => 'upload', - 'name' => !empty($this->_values['is_confirm_enabled']) ? ts('Review your contribution') : ts('Contribute'), + 'name' => ts('Contribute'), 'spacing' => '         ', 'isDefault' => TRUE, ]; + if (!empty($this->_values['is_confirm_enabled'])) { + $submitButton['name'] = ts('Review your contribution'); + $submitButton['icon'] = 'fa-chevron-right'; + } // Add submit-once behavior when confirm page disabled if (empty($this->_values['is_confirm_enabled'])) { $this->submitOnce = TRUE; diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index e39d386e6b..a2bc57ef5f 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -467,25 +467,24 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { // CRM-11182 - Optional confirmation screen // Change button label depending on whether the next action is confirm or register + $buttonParams = [ + 'type' => 'upload', + 'spacing' => '         ', + 'isDefault' => TRUE, + ]; if ( !$this->_values['event']['is_multiple_registrations'] && !$this->_values['event']['is_monetary'] && !$this->_values['event']['is_confirm_enabled'] ) { - $buttonLabel = ts('Register'); + $buttonParams['name'] = ts('Register'); } else { - $buttonLabel = ts('Review your registration'); + $buttonParams['name'] = ts('Review your registration'); + $buttonParams['icon'] = 'fa-chevron-right'; } - $this->addButtons([ - [ - 'type' => 'upload', - 'name' => $buttonLabel, - 'spacing' => '         ', - 'isDefault' => TRUE, - ], - ]); + $this->addButtons([$buttonParams]); } $this->addFormRule(['CRM_Event_Form_Registration_Register', 'formRule'], $this); -- 2.25.1