You are here

public function AvailabilityCalendarStylesFormBuilder::exec in Availability Calendars 7.3

Same name and namespace in other branches
  1. 7.5 availability_calendar.styles.inc \AvailabilityCalendarStylesFormBuilder::exec()
  2. 7.4 availability_calendar.styles.inc \AvailabilityCalendarStylesFormBuilder::exec()

File

./availability_calendar.styles.inc, line 100

Class

AvailabilityCalendarStylesFormBuilder

Code

public function exec() {
  $this
    ->fieldsetTable();
  $this
    ->fieldsetCaption();
  $this
    ->fieldsetHeader();
  $this
    ->fieldsetWeekNotes();
  $this
    ->fieldsetDays();
  $this
    ->fieldsetStates();

  // Place all fieldsets within another fieldset and add the genereate checkbox.
  $this->form = array(
    'availability_calendar_styles_generate' => array(
      '#type' => 'checkbox',
      '#title' => t('Generate the css file.'),
      '#default_value' => $this->styles['generate'],
      '#description' => t("Check whether you want to generate a CSS file based on the styles on this page. If you don't check this, the CSS file won't be generated nor included. As a consequence, you will need to define all styling in your theme."),
    ),
    'availability_calendar_styles' => array(
      '#type' => 'fieldset',
      '#title' => t('CSS Styles'),
      '#tree' => TRUE,
      '#description' => t("Below you can fill in a number of basic styles that define how your calendar will be displayed. If a style is left empty (or @n for selects) that style won't be generated.", array(
        '@n' => '<none>',
      )),
    ) + $this->form,
  );
  return $this->form;
}