You are here

function countries_admin_delete in Countries 7.2

Same name and namespace in other branches
  1. 8 countries.admin.inc \countries_admin_delete()
  2. 7 countries.admin.inc \countries_admin_delete()

Menu callback; confirm deletion of a country.

See also

countries_admin_delete_submit()

1 string reference to 'countries_admin_delete'
countries_menu in ./countries.module
Implements hook_menu().

File

./countries.admin.inc, line 242
Admin page callbacks for the Countries module.

Code

function countries_admin_delete($form, &$form_state, $country) {
  if (country_is_locked($country)) {
    drupal_set_message(t('Core countries defined by the system can not be deleted.'), 'error');
    drupal_goto('admin/config/regional/countries');
  }
  $form['#country'] = $country;
  return confirm_form($form, t('Are you sure you want to delete the country %country?', array(
    '%country' => $country->name,
  )), 'admin/config/regional/countries', t('References that use this country will become invalid. This action cannot be undone.'), t('Delete'), t('Cancel'));
}