You are here

function weather_location_delete_submit in Weather 7

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

Implement hook_form_submit().

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

File

./weather.forms.inc, line 543
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;
}