You are here

function registration_checkin_state_update_callback in Entity Registration 7.2

AJAX submit handler for the state update selection form.

1 string reference to 'registration_checkin_state_update_callback'
registration_checkin_state_form in modules/registration_checkin/registration_checkin.module
Form builder for the checkin state AJAX form.

File

modules/registration_checkin/registration_checkin.module, line 103
Entity Registration registrant checkin workflow and UI for registration.

Code

function registration_checkin_state_update_callback($form, &$form_state) {
  $registration = registration_load($form_state['values']['registration_id']);
  if ($registration) {
    $registration->state = $form_state['values']['registration_state'];
    $registration
      ->save();
  }
  else {
    watchdog('registration_checkin', 'Could not load registration (id: @id) to update state.', array(
      '@id' => $form['registration_id'],
    ));
  }
}