summaryrefslogtreecommitdiff
path: root/httemplate/elements/searchbar-ticket.html
blob: ae86dbcecb916c6d0cc1fc3ad90f94bc211d8525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% if ( $conf->config("ticket_system") ) { 

  <FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
    <INPUT NAME="q" TYPE="text" VALUE="<% $ticketing_label |n %>" STYLE="width:<% $width %>" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" CLASS="fstext"><BR>
    <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html?NewQuery=1" CLASS="fslink" STYLE="font-size:11px"><% mt('Advanced') |h %></A>
    <INPUT TYPE="submit" VALUE="<% mt('Search tickets') |h %>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
  </FORM>
  <% $menu_position eq 'left' ? '<BR>' : '' |n %>

% }

<SCRIPT TYPE="text/javascript">

  function clearhint_search_ticket (what) {
    if ( what.value == '<% $ticketing_label |n %>' )
      what.value = '';
  }

</SCRIPT>
<%once>

my $ticketing_label = emt('(ticket #, subject, email or fulltext:text)');

</%once>
<%init>

my $conf = new FS::Conf;

my $curuser = $FS::CurrentUser::CurrentUser;

my $menu_position = $curuser->option('menu_position') || 'top';

my $width = $menu_position eq 'left' ? '190px' : '223px';

</%init>