Index: masquerade.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/masquerade/masquerade.module,v
retrieving revision 1.16.2.49
diff -u -p -r1.16.2.49 masquerade.module
--- masquerade.module	1 Nov 2010 02:09:01 -0000	1.16.2.49
+++ masquerade.module	1 Dec 2010 06:10:01 -0000
@@ -201,6 +204,16 @@ function masquerade_admin_settings() {
   while ($obj = db_fetch_object($result)) {
     $rids[$obj->rid] = $obj->name;
   }
+  $form['masquerade_block_search_visibility'] = array(
+    '#type' => 'radios',
+    '#title' => t('Masquerade block display'),
+    '#description' => t('Select visibility of Masquerade search box.'),
+    '#options' => array(
+                        t('Show Search and Quick Switch'),
+                        t('Only Show Quick Switch'),
+    ),
+    '#default_value' => variable_get('masquerade_block_search_visibility', 0),
+  );
 
   $form['masquerade_admin_roles'] = array(
     '#type' => 'checkboxes',
@@ -462,8 +475,7 @@ function masquerade_block_1($record) {
         }
       }
     }
-
-    if (masquerade_access('autocomplete')) {
+    if (masquerade_access('autocomplete') && variable_get('masquerade_block_search_visibility',1) == 1) {
       $markup_value .= t('Enter the username to masquerade as.');
       $form['masquerade_user_field'] = array(
         '#prefix' => '<div class="container-inline">',
