$params['id'] = $this->_id;
// skip update of financial type in price set
$params['skipFinancialType'] = TRUE;
- $params['is_confirm_enabled'] = $params['is_monetary'];
CRM_Event_BAO_Event::add($params);
// Update tab "disabled" css class
*/
function buildConfirmationBlock(&$form) {
$attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event');
-
- // CRM-11182 - Optional confirmation page for free events
- $form->addYesNo('is_confirm_enabled', ts('Use a confirmation screen?'), NULL, NULL, array('onclick' => "return showHideByValue('is_confirm_enabled','','confirm_screen_settings','block','radio',false);"));
+ // CRM-11182 - Optional confirmation page for free events
+ $is_monetary = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $form->_id, 'is_monetary');
+ $form->assign('is_monetary', $is_monetary);
+ if ($is_monetary == "0") {
+ $form->addYesNo('is_confirm_enabled', ts('Use a confirmation screen?'), NULL, NULL, array('onclick' => "return showHideByValue('is_confirm_enabled','','confirm_screen_settings','block','radio',false);"));
+ }
$form->add('text', 'confirm_title', ts('Title'), $attributes['confirm_title']);
$form->addWysiwyg('confirm_text', ts('Introductory Text'), $attributes['confirm_text']);
// FIXME: This hack forces height of editor to 175px. Need to modify QF classes for editors to allow passing
// Check whether to process the registration now, calling processRegistration()
if (
!$this->_values['event']['is_confirm_enabled'] // CRM-11182 - Optional confirmation screen
+ && !$this->_values['event']['is_monetary']
&& CRM_Utils_Array::value('additional_participants', $this->_params[0])
&& $this->isLastParticipant()
) {
// Change button label depending on whether the next action is confirm or register
if (
!$this->_values['event']['is_multiple_registrations']
+ && !$this->_values['event']['is_monetary']
&& !$this->_values['event']['is_confirm_enabled']
) {
$buttonLabel = ts('Register >>');
$pages = array_merge($pages, $additionalPages);
// CRM-11182 - Optional confirmation screen
- if (!$is_confirm_enabled) {
+ if (!$is_confirm_enabled && !$is_monetary) {
unset($pages['CRM_Event_Form_Registration_Confirm']);
}
{*Confirmation Block*}
<fieldset id="confirm" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
<legend class="collapsible-title">{ts}Confirmation Screen{/ts}</legend>
- <table class="form-layout-compressed">
- <tr class="crm-event-manage-registration-form-block-is_confirm_enabled">
- <td scope="row" class="label" width="20%">{$form.is_confirm_enabled.label}</td>
- <td>{$form.is_confirm_enabled.html}
- <div class="description">{ts}Optionally hide the confirmation screen for free events.{/ts}</div>
- </td>
- </tr>
- </table>
+ {if !$is_monetary}
+ <table class="form-layout-compressed">
+ <tr class="crm-event-manage-registration-form-block-is_confirm_enabled">
+ <td scope="row" class="label" width="20%">{$form.is_confirm_enabled.label}</td>
+ <td>{$form.is_confirm_enabled.html}
+ <div class="description">{ts}Optionally hide the confirmation screen for free events.{/ts}</div>
+ </td>
+ </tr>
+ </table>
+ {/if}
<div id="confirm_screen_settings">
<table class="form-layout-compressed">
field_type ="radio"
invert = 0
}
-
+{if !$is_monetary}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="is_confirm_enabled"
trigger_value =""
field_type ="radio"
invert = 0
}
-
+{/if}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="is_email_confirm"
trigger_value =""