You are here

function appointment_calendar_date_list_form_submit in Appointment Calendar 7

Implements hook_form_state().

File

./appointment_calendar_list.inc, line 89
Provides Listing page for Created date(s) in Appointment calendar.

Code

function appointment_calendar_date_list_form_submit($form, &$form_state) {

  // Goto current path if reset.
  if ($form_state['values']['op'] == t('Reset')) {
    drupal_goto(current_path());
  }

  // Pass values to url.
  if ($form_state['values']['op'] == t('Filter')) {
    $filter_date = $form_state['values']['filter_date'];
    $filter_to_date = $form_state['values']['filter_to_date'];
    $params['date'] = check_plain($filter_date);
    $params['todate'] = check_plain($filter_to_date);
    drupal_goto('admin/config/appointment-calendar/settings/list-date', array(
      'query' => $params,
    ));
  }
}