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;
// 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);