You are here

function calendar_systems_profile_delete_confirm_submit in Calendar Systems 8

Same name and namespace in other branches
  1. 6.3 calendar_systems.admin.inc \calendar_systems_profile_delete_confirm_submit()
  2. 6 calendar_systems.admin.inc \calendar_systems_profile_delete_confirm_submit()
  3. 7.3 calendar_systems.admin.inc \calendar_systems_profile_delete_confirm_submit()
  4. 7 calendar_systems.admin.inc \calendar_systems_profile_delete_confirm_submit()
  5. 7.2 calendar_systems.admin.inc \calendar_systems_profile_delete_confirm_submit()

Submission callback for profile removal confirmarion form.

File

./calendar_systems.admin.inc, line 185
Contains Calendar Systems administration form callbacks.

Code

function calendar_systems_profile_delete_confirm_submit($form, &$form_state) {

  // Delete the specified profile:
  db_delete('calendar_systems')
    ->condition('language', $form_state['values']['profile'])
    ->execute();

  // Notify user:
  drupal_set_message(t('Calendar systems profile for %name has been deleted.', array(
    '%name' => $form_state['values']['profile'],
  )));

  // Redirect user to the profile overview form:
  $form_state['redirect'] = 'admin/config/regional/calendar-systems';
}