Change "Reset form" to "Clear Form"
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / advanced / search.tt2
1 [% 
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS get_library;
4 %]
5 <form action="[% ctx.opac_root %]/results" method="GET">
6 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
7     <tr style='border-bottom: none;'>
8         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
9         <td valign='top' class='adv_global_input_container'>
10             <table width='100%' id='adv_global_input_table'>
11                 <thead>
12                     <tr>
13                         <td>
14                             <div style="width:100%;" class="header_middle">
15                                 [% l("Search Input") %]
16                             </div>
17                         </td>
18                     </tr>
19                 </thead>
20                 <tbody id='adv_global_tbody'>
21                     [% INCLUDE "opac/parts/advanced/global_row.tt2" %]
22                     <!-- add a new row -->
23                     <tr id='adv_global_addrow'>
24                         <td align='left' style="padding-top:7px;">
25                             <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>[% l('Add Search Row') %]</a>
26                         </td>
27                     </tr>
28                 </tbody>
29             </table>
30         </td>
31     </tr>
32     <tr>
33         <td align='top'>
34           <div style="width:100%;" class="header_middle">[% l('Search Filters') %]</div>
35           <table cellpadding='10' cellspacing='0' border='0'>
36 [%
37     in_row = 0;
38     FOR adv_chunk IN search.adv_config;
39         NEXT IF adv_chunk.adv_hide;
40         IF in_row == 0;
41             in_row = 1; %]
42             <tr>
43 [%
44         END; %]
45             <td valign='top'>
46                 <strong>[% adv_chunk.adv_label %]</strong><br />
47 [%
48         IF adv_chunk.adv_special;
49             SWITCH adv_chunk.adv_special;
50                 CASE "lib_selector";
51                     PROCESS "opac/parts/org_selector.tt2";
52                         INCLUDE build_org_selector show_loc_groups=1; %]
53                             <div style="position:relative;top:7px;">
54                                 <input type='checkbox' name="modifier"
55                                     value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
56                                     id='opac.result.limit2avail' />
57                                 <label style="position:relative;top:-2px;"
58                                     for='opac.result.limit2avail'>
59                                     [% l("Limit to Available") %]</label>
60                             </div>
61 [%
62                 CASE "pub_year"; %]
63                             <select name='pubdate' onchange='
64                                 if(this.selectedIndex == 3)
65                                     unHideMe($("adv_global_pub_date_2_span"));
66                                 else
67                                     hideMe($("adv_global_pub_date_2_span"));'>
68                                     [%  FOR opt IN [
69                                             {"code" => "is", "label" => l("Is")},
70                                             {"code" => "before", "label" => l("Before")},
71                                             {"code" => "after", "label" => l("After")},
72                                             {"code" => "between", "label" => l("Between")} ] %]
73                                         <option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
74                                     [%  END %]
75                             </select>    
76                             <div style='margin-top:5px;'>
77                                 <input name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
78                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
79                                    [% l("and") %] <input name='date2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
80                                 </span>
81                             </div>
82 [%
83                 CASE "sort_selector";
84                     INCLUDE "opac/parts/filtersort.tt2"
85                         value=CGI.param('sort') class='results_header_sel';
86             END;
87         ELSIF adv_chunk.adv_attr;
88             INCLUDE "opac/parts/coded_value_selector.tt2"
89                 attr=adv_chunk.adv_attr multiple="multiple" size="4";
90         END; %]
91             </td>
92 [%
93         IF adv_chunk.adv_break;
94             in_row = 0; %]
95             </tr>
96 [%
97         END;
98     END; %]
99             </table>
100         </td>
101     </tr>
102 </table>
103 <input type="hidden" name="_adv" value="1" />
104 <input type="submit" value="[% l('Search') %]" class='pointer opac-button' />
105 <a href="[% mkurl(ctx.opac_root _ '/advanced', {$loc_name => loc_value}, 1) %]"
106     class="pointer opac-button">[% l('Clear Form') %]</a>
107 </form>