function system_date_format_localize_form_submit

Form submission handler for system_date_format_localize_form().

File

drupal/core/modules/system/system.admin.inc, line 2841
Admin page callbacks for the system module.

Code

function system_date_format_localize_form_submit($form, &$form_state) {
  $langcode = $form_state['values']['langcode'];
  $formats = system_get_date_formats();
  foreach ($formats as $date_format_id => $format_info) {
    if (isset($form_state['values']['date_format_' . $date_format_id])) {
      $format = $form_state['values']['date_format_' . $date_format_id];
      system_date_format_localize_form_save($langcode, $date_format_id, $formats[$format]['pattern']);
    }
  }
  drupal_set_message(t('Configuration saved.'));
  $form_state['redirect'] = 'admin/config/regional/date-time/locale';
}