diff options
author | ivan <ivan> | 2010-03-25 20:21:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-03-25 20:21:51 +0000 |
commit | 483a2e4dad0f7ce8dbdc06a825d1aa11bd742f6b (patch) | |
tree | 5b8e7f3fb59090833c5b4e006a9605ff5076e2a4 /httemplate/elements/searchbar-prospect.html | |
parent | f6ad19602096411e6248750d840f0a6e2e0ee036 (diff) |
when using a side menubar, put search boxes on the side too
Diffstat (limited to 'httemplate/elements/searchbar-prospect.html')
-rw-r--r-- | httemplate/elements/searchbar-prospect.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/httemplate/elements/searchbar-prospect.html b/httemplate/elements/searchbar-prospect.html new file mode 100644 index 000000000..68b90d4e3 --- /dev/null +++ b/httemplate/elements/searchbar-prospect.html @@ -0,0 +1,33 @@ +% if ( $curuser->access_right('List prospects') ) { + + <FORM ACTION="<%$fsurl%>search/prospect_main.html" METHOD="GET" STYLE="margin:0"> + <INPUT NAME="search_prospect" TYPE="text" VALUE="<% $prospect_label |n %>" STYLE="width:<%$width%>" onFocus="clearhint_search_prospect(this);" onClick="clearhint_search_prospect(this);" CLASS="fstext"><BR> + <A HREF="<%$fsurl%>search/report_prospect_main.html" CLASS="fslink" STYLE="font-size: 11px">Adv</A> + <INPUT TYPE="submit" VALUE="Search prospects" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px;padding-left:1px;padding-right:1px"> + </FORM> + <% $menu_position eq 'left' ? '<BR>' : '' %> + +% } + +<SCRIPT TYPE="text/javascript"> + + function clearhint_search_prospect (what) { + if ( what.value == '<% $prospect_label |n %>' ) + what.value = ''; + } + +</SCRIPT> +<%once> + +my $prospect_label = '(name, company or phone)'; + +</%once> +<%init> + +my $curuser = $FS::CurrentUser::CurrentUser; + +my $menu_position = $curuser->option('menu_position') || 'top'; + +my $width = $menu_position eq 'left' ? '190px' : '155px'; + +</%init> |