You are here

function icon_bundle_reset_form_submit in Icon API 8

Same name and namespace in other branches
  1. 7 includes/admin.inc \icon_bundle_reset_form_submit()

Submit callback for 'icon_bundle_reset_form'.

File

includes/admin.inc, line 362
admin.inc Provides administrative callbacks and tasks.

Code

function icon_bundle_reset_form_submit($form, &$form_state) {

  // Redirect to the overview form after submit.
  $destination = ICON_ADMIN_PATH;
  if (isset($_GET['destination'])) {
    $destination = array(
      'destination' => $_GET['destination'],
    );
  }
  $form_state['redirect'] = array(
    $destination,
  );
  if (!empty($form_state['values']['confirm'])) {
    icon_bundle_delete($form_state['build_info']['args'][0]);
  }
}