function locale_date_format_form_submit
locale_date_format_form_submit($form, &$form_state)
Submit handler for configuring localized date formats on the locale_date_format_form.
File
- modules/locale/locale.admin.inc, line 1395
- Administration functions for locale.module.
Code
function locale_date_format_form_submit($form, &$form_state) { include_once DRUPAL_ROOT . '/includes/locale.inc'; $langcode = $form_state['values']['langcode']; // Get list of date format types. $types = system_get_date_types(); foreach ($types as $type => $type_info) { $format = $form_state['values']['date_format_' . $type]; if ($format == 'custom') { $format = $form_state['values']['date_format_' . $type . '_custom']; } locale_date_format_save($langcode, $type, $format); } drupal_set_message(t('Configuration saved.')); $form_state['redirect'] = 'admin/config/regional/date-time/locale'; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!locale!locale.admin.inc/function/locale_date_format_form_submit/7.x