You are here

function opigno_statistics_app_dashboard_filter_form_ajax_submit in Opigno Statistics App 7

Implements hook_form_ajax_submit().

1 string reference to 'opigno_statistics_app_dashboard_filter_form_ajax_submit'
opigno_statistics_app_dashboard_filter_form in includes/dashboard/filter_form.inc
Implements hook_form().

File

includes/dashboard/filter_form.inc, line 57

Code

function opigno_statistics_app_dashboard_filter_form_ajax_submit($form, &$form_state) {
  $form_values = $form_state['values'];
  variable_set('opigno_statistics_app_dashboard_filter_form_values', $form_values);
  $has_month = !empty($form_values['month']);
  $month_year = $has_month ? mktime(0, 0, 0, $form_values['month'], 1, $form_values['year']) : mktime(0, 0, 0, 1, 1, $form_values['year']);
  variable_set('opigno_statistics_app_dashboard_month_year', $month_year);
  variable_set('opigno_statistics_app_dashboard_has_month', $has_month);
  variable_set('opigno_statistics_app_dashboard_category', $form_values['category']);
  return '<script type="text/javascript">document.location.reload();</script>';
}