function countries_admin_form_submit in Countries 8
Same name and namespace in other branches
- 7.2 countries.admin.inc \countries_admin_form_submit()
- 7 countries.admin.inc \countries_admin_form_submit()
Process country form submissions.
File
- ./
countries.admin.inc, line 241 - Admin page callbacks for the Countries module.
Code
function countries_admin_form_submit($form, &$form_state) {
$country = (object) $form_state['values'];
entity_form_submit_build_entity('country', $country, $form, $form_state);
if (country_save($country) == SAVED_UPDATED) {
$message = t('The country %country has been updated.', array(
'%country' => $country->name,
));
}
else {
$message = t('Added country %country.', array(
'%country' => $country->name,
));
}
drupal_set_message($message);
$form_state['redirect'] = 'admin/config/regional/countries';
}