You are here

function node_registration_cancel in Node registration 7

Menu callback -- ask for confirmation of registration cancellation

1 string reference to 'node_registration_cancel'
node_registration_block_view in ./node_registration.module
Implements hook_block_view().

File

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

Code

function node_registration_cancel($form, &$form_state, $registration) {

  // Always provide entity id in the same form key as in the entity edit form.
  $form['#registration'] = $registration;
  $form['description'] = array(
    '#markup' => t('Are you sure you want to cancel registration %title?', array(
      '%title' => $registration->registration_id,
    )),
  );
  $form['confirm'] = array(
    '#type' => 'submit',
    '#value' => t('Yes'),
    '#submit' => array(
      'node_registration_cancel_confirm_submit',
    ),
  );
  $form['no'] = array(
    '#type' => 'submit',
    '#value' => t('No'),
  );
  return $form;
}