if (empty($this->_values['event']['is_monetary'])) {
$js = array('onclick' => "return submitOnce(this,'" . $this->_name . "','" . ts('Processing') . "');");
}
+
+ // CRM-11182 - Optional confirmation screen
+ // Change button label depending on whether the next action is confirm or register
+ if (
+ !$this->_values['event']['is_multiple_registrations']
+ && !$this->_values['event']['is_confirm_enabled']
+ ) {
+ $buttonLabel = ts('Register >>');
+ } else {
+ $buttonLabel = ts('Continue >>');
+ }
+
$this->addButtons(array(
array(
'type' => 'upload',
- 'name' => ts('Continue >>'),
+ 'name' => $buttonLabel,
'spacing' => ' ',
'isDefault' => TRUE,
'js' => $js,
$this->_params[] = $params;
$this->set('params', $this->_params);
- if (empty($params['additional_participants'])) {
+ if (
+ empty($params['additional_participants'])
+ && !$this->_values['event']['is_confirm_enabled'] // CRM-11182 - Optional confirmation screen
+ ) {
self::processRegistration($this->_params);
}
}