You are here

function weather_location_delete_submit in Weather 7.3

Same name and namespace in other branches
  1. 7 weather.forms.inc \weather_location_delete_submit()
  2. 7.2 weather.forms.inc \weather_location_delete_submit()

Implements hook_form_submit().

1 string reference to 'weather_location_delete_submit'
weather_location_settings_form in ./weather.forms.inc
Create a form for a weather place.

File

./weather.forms.inc, line 703
Provide forms for configuration of weather displays.

Code

function weather_location_delete_submit($form, &$form_state) {
  if ($form_state['values']['display_type'] == 'user') {
    $path = 'user/' . $form_state['values']['display_number'] . '/weather/' . $form_state['values']['id'] . '/delete';
  }
  else {
    $path = 'admin/config/user-interface/weather/system-wide/' . $form_state['values']['display_number'] . '/' . $form_state['values']['id'] . '/delete';
  }
  $form_state['redirect'] = $path;
}