1 |
87dbc3bf
|
Benjamin Luce
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
function bootstrap_exposed_filters($variables) {
|
11 |
|
|
$form = $variables['form'];
|
12 |
|
|
$output = '';
|
13 |
|
|
|
14 |
|
|
foreach (element_children($form['status']['filters']) as $key) {
|
15 |
|
|
$form['status']['filters'][$key]['#field_prefix'] = '<div class="col-sm-10">';
|
16 |
|
|
$form['status']['filters'][$key]['#field_suffix'] = '</div>';
|
17 |
|
|
}
|
18 |
|
|
$form['status']['actions']['#attributes']['class'][] = 'col-sm-offset-2';
|
19 |
|
|
$form['status']['actions']['#attributes']['class'][] = 'col-sm-10';
|
20 |
|
|
$form['status']['actions']['#prefix'] = '<div class="form-group">';
|
21 |
|
|
$form['status']['actions']['#suffix'] = '</div>';
|
22 |
|
|
|
23 |
|
|
if (isset($form['current'])) {
|
24 |
|
|
$items = array();
|
25 |
|
|
foreach (element_children($form['current']) as $key) {
|
26 |
|
|
$items[] = drupal_render($form['current'][$key]);
|
27 |
|
|
}
|
28 |
|
|
$output .= theme('item_list', array(
|
29 |
|
|
'items' => $items,
|
30 |
|
|
'attributes' => array(
|
31 |
|
|
'class' => array(
|
32 |
|
|
'clearfix',
|
33 |
|
|
'current-filters',
|
34 |
|
|
),
|
35 |
|
|
),
|
36 |
|
|
));
|
37 |
|
|
}
|
38 |
|
|
$output .= drupal_render_children($form);
|
39 |
|
|
return '<div class="form-horizontal">' . $output . '</div>';
|
40 |
|
|
} |