You are here

function opening_hours_admin_blocked_day_add_form_submit in Opening hours 7

Same name and namespace in other branches
  1. 6 includes/opening_hours.admin.inc \opening_hours_admin_blocked_day_add_form_submit()

Submit handler for blocked day add form.

File

includes/opening_hours.admin.inc, line 92
Administration page for opening hours.

Code

function opening_hours_admin_blocked_day_add_form_submit(&$form, &$form_state) {
  $blocked_days = variable_get('opening_hours_blocked_days', array());
  $blocked_days[] = $form_state['values']['date'];
  sort($blocked_days);
  variable_set('opening_hours_blocked_days', $blocked_days);
  drupal_set_message(t('Blocked day %date added.', array(
    '%date' => $form_state['values']['date'],
  )));
  $form_state['redirect'] = 'admin/structure/opening_hours';
}