1 % if ( $curuser->access_right('List customers') ) {
3 <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="POST" STYLE="margin:0">
4 <INPUT NAME="search_cust" TYPE="text" VALUE="<% $cust_label |n %>" STYLE="width:<%$width%>" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" CLASS="fstext"><BR>
5 <A HREF="<%$fsurl%>search/report_cust_main.html" CLASS="fslink" STYLE="font-size: 11px"><% mt('Advanced') |h %></A>
6 <INPUT TYPE="submit" VALUE="<% mt('Search customers') |h %>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
8 <% $menu_position eq 'left' ? '<BR>' : '' |n %>
12 <SCRIPT TYPE="text/javascript">
14 function clearhint_search_cust (what) {
15 if ( what.value == '<% $cust_label |n %>' )
22 my $conf = new FS::Conf;
24 my $curuser = $FS::CurrentUser::CurrentUser;
26 my $menu_position = $curuser->option('menu_position') || 'top';
29 my $cust_label = '(cust #, name, company';
30 if ( $conf->exists('address1-search') ) {
31 $cust_label .= ', address';
34 $cust_label .= ' or contact phone)';
36 $cust_label = emt($cust_label);
38 my $width = $menu_position eq 'left' ? '190px' : $cust_width.'px';