You are here

function node_registration_cancel_confirm_submit in Node registration 7

Execute node registration cancellation.

2 string references to 'node_registration_cancel_confirm_submit'
node_registration_cancel in includes/node_registration.forms.inc
Menu callback -- ask for confirmation of registration cancellation
node_registration_cancel_confirm in includes/node_registration.forms.inc
Menu callback -- ask for confirmation of registration cancellation.

File

includes/node_registration.forms.inc, line 1184
New registration forms. Public and admin.

Code

function node_registration_cancel_confirm_submit($form, &$form_state) {
  $registration = $form['#registration'];
  $node = node_load($registration->nid);
  if ($form_state['values']['confirm']) {
    node_registration_cancel_action($registration, TRUE);

    // Notify user.
    drupal_set_message(t('Registration %id has been cancelled.', array(
      '%id' => $registration->registration_id,
    )));
  }
  $form_state['redirect'] = 'node/' . $registration->nid;
}