You are here

function date_api_delete_format_form_submit in Date 6.2

Delete a configured date format.

File

./date_api.admin.inc, line 180
Administrative page callbacks for the date_api module.

Code

function date_api_delete_format_form_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $format = date_get_format($form_state['values']['dfid']);
    date_format_delete($form_state['values']['dfid']);
    drupal_set_message(t('Removed date format %format.', array(
      '%format' => date_format_date(date_now(), 'custom', $format['format']),
    )));
    $form_state['redirect'] = 'admin/settings/date-time/formats/custom';
  }
}