root / drupal7 / sites / all / themes / bootstrap / templates / system / date.func.php @ 749b8a23
1 | 87dbc3bf | Benjamin Luce | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | caf16a48 | Assos Assos | * Stub file for bootstrap_date().
|
5 | 87dbc3bf | Benjamin Luce | */
|
6 | |||
7 | /**
|
||
8 | caf16a48 | Assos Assos | * Returns HTML for a date selection form element.
|
9 | *
|
||
10 | * @param array $variables
|
||
11 | * An associative array containing:
|
||
12 | * - element: An associative array containing the properties of the element.
|
||
13 | * Properties used: #title, #value, #options, #description, #required,
|
||
14 | * #attributes.
|
||
15 | *
|
||
16 | * @return string
|
||
17 | * The constructed HTML.
|
||
18 | *
|
||
19 | * @see theme_date()
|
||
20 | *
|
||
21 | * @ingroup theme_functions
|
||
22 | 87dbc3bf | Benjamin Luce | */
|
23 | function bootstrap_date($variables) { |
||
24 | $element = $variables['element']; |
||
25 | |||
26 | $attributes = array(); |
||
27 | if (isset($element['#id'])) { |
||
28 | $attributes['id'] = $element['#id']; |
||
29 | } |
||
30 | if (!empty($element['#attributes']['class'])) { |
||
31 | $attributes['class'] = (array) $element['#attributes']['class']; |
||
32 | } |
||
33 | $attributes['class'][] = 'form-inline'; |
||
34 | |||
35 | return '<div' . drupal_attributes($attributes) . '>' . drupal_render_children($element) . '</div>'; |
||
36 | } |