3 {value => 'contains', label => l('Contains')},
4 {value => 'nocontains', label => l('Does not contain')},
5 {value => 'phrase', label => l('Contains phrase')},
6 {value => 'exact', label => l('Matches exactly')}
8 contains = CGI.param('contains');
9 queries = CGI.param('query');
10 bools = CGI.param('bool') || ['and' x 3];
11 qtypes = CGI.param('qtype') || ['keyword' x 3];
13 IF !qtypes.0; # not an array
19 WHILE qtypes.size < 3;
20 qtypes.push('keyword');
30 <!-- tag the second row so the bool column won't be hidden -->
31 <tr[% IF loop.index == 1 %] id="adv_global_row"[% END %]>
32 <td align='left' width='100%' nowrap='nowrap'>
34 <!-- bool selector. hide for first row. safe to ignore first bool value in form submission -->
35 <select name='bool' style='width: auto' [% IF loop.first %] class='invisible' [% END %]>
36 <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
37 <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
40 <!-- keyword, subject, etc. selector -->
41 <span class="qtype_selector_margin">
42 [% INCLUDE "opac/parts/qtype_selector.tt2"
46 <select name='contains' style='margin-right: 7px;'>
47 [% FOR o IN contains_options; -%]
48 <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
51 <input type='text' size='18' name='query' value="[% q | html %]" x-webkit-speech />
52 <a href="javascript:;" class="row-remover"
53 title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
54 onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>