Index: masquerade.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/masquerade/masquerade.module,v
retrieving revision 1.16.2.42
diff -u -p -r1.16.2.42 masquerade.module
--- masquerade.module	22 Jul 2010 13:41:19 -0000	1.16.2.42
+++ masquerade.module	27 Jul 2010 05:34:49 -0000
@@ -199,6 +199,17 @@ function masquerade_admin_settings() {
     $rids[$obj->rid] = $obj->name;
   }
 
+  $form['masquerade_search'] = array(
+    '#type' => 'select',
+    '#title' => t('Display'),
+    '#description' => t('Select visibility of Masquerade search box.'),
+    '#options' => array(
+      'en' => t('Show Search and Quick Switch'),
+      'di' => t('Only Show Quick Switch'),
+    ),
+    '#default_value' => variable_get('masquerade_search', array()),
+  );
+
   $form['masquerade_admin_roles'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Roles that are considered "administrators" for masquerading'),
@@ -455,7 +466,7 @@ function masquerade_block_1($record) {
       }
     }
 
-    if (masquerade_access('autocomplete')) {
+    if (masquerade_access('autocomplete') && variable_get('masquerade_search','en') == 'en') {
       $markup_value .= t('Enter the username to masquerade as.') . '<br /><br />';
       $form['masquerade_user_field'] = array(
         '#prefix' => '<div class="container-inline">',
@@ -473,7 +484,7 @@ function masquerade_block_1($record) {
     }
 
     if (isset($quick_switch_link) && count($quick_switch_link)) {
-      $markup_value .= '<div id="quick_switch_links">'. t('Quick switches:') . theme('item_list', $quick_switch_link) .'</div>';
+      $markup_value .= '<div id="quick_switch_links">'. t('Quick switch:') . theme('item_list', $quick_switch_link) .'</div>';
     }
   }
   $form['masquerade_desc'] = array(
