/[drupal]/contributions/modules/views_checkboxes/views_checkboxes.module
ViewVC logotype

Diff of /contributions/modules/views_checkboxes/views_checkboxes.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8.2.6, Mon Jun 9 00:36:24 2008 UTC revision 1.8.2.7, Fri Jun 13 19:55:23 2008 UTC
# Line 3  Line 3 
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    }    }
# Line 87  function views_checkboxes_form_alter($fo Line 87  function views_checkboxes_form_alter($fo
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);
# Line 162  function views_checkboxes_form_alter($fo Line 154  function views_checkboxes_form_alter($fo
154      }      }
155    }    }
156  }  }
157    
158    // --- End --- Drupal docs advise NOT closing the PHP tags.

Legend:
Removed from v.1.8.2.6  
changed lines
  Added in v.1.8.2.7

  ViewVC Help
Powered by ViewVC 1.1.2