1 system.admin.inc system_date_delete_format_form($form, &$form_state, $format)

Menu callback; present a form for deleting a date format.

Parameters

array $format: The date format being deleted.

File

core/modules/system/system.admin.inc, line 2689
Admin page callbacks for the System module.

Code

function system_date_delete_format_form($form, &$form_state, $format) {
  $form_state['format'] = $format;

  // Do not allow deletion of module-provided formats.
  if (!empty($format['module'])) {
    backdrop_access_denied();
    backdrop_exit();
  }

  $output = confirm_form($form, 
  t('Are you sure you want to remove the format %label: %format?', array('%label' => $format['label'], '%format' => format_date(REQUEST_TIME, 'custom', $format['pattern']))), 
  'admin/config/regional/date-time/formats', 
  t('This action cannot be undone.'), 
  t('Remove'), t('Cancel'), 
  'confirm'
  );

  return $output;
}