You are here

function availability_calendars_styles_validate in Availability Calendars 6.2

Same name and namespace in other branches
  1. 7.2 availability_calendars.styles.inc \availability_calendars_styles_validate()

Callback to validate the form for the style settings.

1 string reference to 'availability_calendars_styles_validate'
availability_calendars_styles in ./availability_calendars.styles.inc
Callback to retrieve a form for the admin/settings/availability-calendars/styles page.

File

./availability_calendars.styles.inc, line 50

Code

function availability_calendars_styles_validate($form, &$form_state) {
  $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
  if ($op == t('Save configuration')) {

    // @todo: validate colors, lengths (note that Drupal validates select's for existing values)
    $css_validator = new AvailabilityCalendarsStylesFormValidator($form_state['values']);
    $css_validator
      ->exec();
  }
}