You are here

function weather_display_delete_submit in Weather 7

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

Implement hook_form_submit().

1 string reference to 'weather_display_delete_submit'
weather_display_settings_form in ./weather.forms.inc
Create a settings form for a weather display.

File

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

Code

function weather_display_delete_submit($form, &$form_state) {
  if ($form_state['values']['type'] == 'user') {
    $path = 'user/' . $form_state['values']['number'] . '/weather/display/delete';
  }
  else {
    $path = 'admin/config/user-interface/weather/system-wide/' . $form_state['values']['number'] . '/delete';
  }
  $form_state['redirect'] = $path;
}