function theme_date_repeat_rrule in Date 8
Same name and namespace in other branches
- 7.3 date_repeat/date_repeat_form.inc \theme_date_repeat_rrule()
- 7 date_repeat/date_repeat_form.inc \theme_date_repeat_rrule()
- 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 951 - 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 = array(
'date-no-float',
'collapsible',
);
$id = drupal_html_id('repeat-settings-fieldset');
$parents = $element['#parents'];
$selector = "{$parents[0]}[{$parents[1]}][{$parents[2]}][show_repeat_settings]";
$fieldset = array(
'#type' => 'item',
'#title' => t('Repeat settings'),
'#title_display' => 'invisible',
'#attributes' => array(
'class' => $class,
),
'#markup' => $element['#children'],
'#states' => array(
'visible' => array(
":input[name=\"{$selector}\"]" => array(
'checked' => TRUE,
),
),
),
'#id' => $id,
);
return drupal_render($fieldset);
}