| 3 |
|
|
| 4 |
function views_checkboxes_help($section='') { |
function views_checkboxes_help($section='') { |
| 5 |
$output = ''; |
$output = ''; |
| 6 |
$new_features = '<p>Also, you can optionally override the size of select lists (the number of elements displayed) and other minor changes.</p>'; |
$new_features = '<p>Also, you can override the default size of select lists (the number of elements displayed).</p>'; |
| 7 |
|
|
| 8 |
switch ($section) { |
switch ($section) { |
| 9 |
case 'admin/help#views_checkboxes': |
case 'admin/help#views_checkboxes': |
| 10 |
$output .= '<p>Alters view filter forms to replace select elements wth checkboxes and radio buttons.</p>'; |
$output .= '<p>Alters View filter forms to replace select elements wth checkboxes and radio buttons.</p>'; |
| 11 |
$output .= $new_features; |
$output .= $new_features; |
| 12 |
break; |
break; |
| 13 |
case 'admin/settings/views_checkboxes': |
case 'admin/settings/views_checkboxes': |
| 14 |
$output .= '<p>Enable this module to replace all select form elements in view filters with checkboxes or radio buttons, as appropriate.</p>'; |
$output .= '<p>Enable this module to replace all select form elements in View filters with checkboxes or radio buttons, as appropriate.</p>'; |
| 15 |
$output .= $new_features; |
$output .= $new_features; |
| 16 |
break; |
break; |
| 17 |
} |
} |
| 87 |
// Views which have exposed filters get a $form_id of 'views_filters' |
// Views which have exposed filters get a $form_id of 'views_filters' |
| 88 |
if ($form_id != 'views_filters') return; // Not a Views filter, quick exit |
if ($form_id != 'views_filters') return; // Not a Views filter, quick exit |
| 89 |
|
|
|
// --- Remove this section later --- |
|
|
// My tests indicate that the following tests aren't necessary because |
|
|
// there are *always* filters if we get 'views_filters' as the $form_id |
|
|
// In any case, the foreach loop below will do nothing if there are no filters. |
|
|
// $view = $form['view']['#value']; |
|
|
// if (!isset($view->exposed_filter) ) return; // No exposed filters so nothing to do. |
|
|
// if (!count($view->exposed_filter) ) return; // No exposed filters so nothing to do. |
|
|
|
|
| 90 |
// Get configuration values... |
// Get configuration values... |
| 91 |
$limit = variable_get('views_checkboxes_limit', 5); |
$limit = variable_get('views_checkboxes_limit', 5); |
| 92 |
$list_size = variable_get('views_checkboxes_listsize', FALSE); |
$list_size = variable_get('views_checkboxes_listsize', FALSE); |
| 154 |
} |
} |
| 155 |
} |
} |
| 156 |
} |
} |
| 157 |
|
|
| 158 |
|
// --- End --- Drupal docs advise NOT closing the PHP tags. |