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

Process date format string submission.

File

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

Code

function system_configure_date_formats_form_submit($form, &$form_state) {
  $format = (array) $form_state['format'];
  $format = array_merge($format, $form_state['values']);
  system_date_format_save($format);
  token_cache_clear();
  if (!empty($form_state['values']['name'])) {
    backdrop_set_message(t('Date format updated.'));
  }
  else {
    backdrop_set_message(t('Custom date format added.'));
  }

  $form_state['redirect'] = 'admin/config/regional/date-time/formats';
}