You are here

function theme_date_repeat_rrule in Date 7

Same name and namespace in other branches
  1. 8 date_repeat/date_repeat_form.inc \theme_date_repeat_rrule()
  2. 7.3 date_repeat/date_repeat_form.inc \theme_date_repeat_rrule()
  3. 7.2 date_repeat/date_repeat_form.inc \theme_date_repeat_rrule()

Wrapper fieldset for repeat rule.

File

date_repeat/date_repeat_form.inc, line 375
Code to add a date repeat selection form to a date field and create an iCal RRULE from the chosen selections.

Code

function theme_date_repeat_rrule($vars) {
  $element = $vars['element'];
  $class = $element['#date_repeat_collapsed'] ? array(
    'collapsible',
    'collapsed',
  ) : array(
    'collapsible',
  );
  $fieldset = array(
    '#title' => t('Repeat'),
    '#value' => '',
    '#description' => theme('advanced_help_topic', 'date_api', 'date-repeat-form') . t('Choose a frequency and period to repeat this date. If nothing is selected, the date will not repeat.'),
    '#attributes' => array(
      'class' => $class,
    ),
    '#children' => $element['#children'],
  );

  // Make sure we don't get floating parts where we don't want them.
  $element['#prefix'] = '<div class="date-clear">';
  $element['#suffix'] = '</div>';
  return theme('fieldset', array(
    'element' => $fieldset,
  ));
}