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');
11 qtypes = CGI.param('qtype');
14 # scalar.merge treats the scalar as a 1-item array
15 WHILE queries.size < rowcount; queries = queries.merge(['']); END;
16 WHILE bools.size < rowcount; bools = bools.merge(['and']); END;
17 WHILE qtypes.size < rowcount; qtypes = qtypes.merge(['keyword']); END;
24 <!-- tag the second row so the bool column won't be hidden -->
25 <tr[% IF loop.index == 1 %] id="adv_global_row"[% END %]>
26 <td align='left' width='100%' nowrap='nowrap'>
28 <!-- bool selector. hide for first row. safe to ignore first bool value in form submission -->
29 <select name='bool' style='width: auto' [% IF loop.first %] class='invisible' [% END %]>
30 <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
31 <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
34 <!-- keyword, subject, etc. selector -->
35 <span class="qtype_selector_margin">
36 [% INCLUDE "opac/parts/qtype_selector.tt2"
40 <select name='contains' style='margin-right: 7px;'>
41 [% FOR o IN contains_options; -%]
42 <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
45 <input type='text' size='18' name='query' value="[% q | html %]" x-webkit-speech [% IF loop.index == 0 %] autofocus [% END %] />
46 <a href="javascript:;" class="row-remover"
47 title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
48 onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>