TPAC: href not valid on 'button' tags
[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 <div id='adv_global_search' class='data_grid data_grid_center'>
7     <div id='adv_search_rows'>
8         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
9         <div valign='top' class='adv_global_input_container'>
10             <table id='adv_global_input_table'>
11                 <thead>
12                     <tr>
13                         <td>
14                             <div class="header_middle" id="adv_search_input">
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'>
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         </div>
31     </div>
32
33     <div id='adv_search_submit'>
34         <input type="hidden" name="_adv" value="1" />
35         <span>
36             <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"
37                 onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
38             <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' class='hidden' alt=''/>
39         </span>
40
41         <a href="[% mkurl(ctx.opac_root _ '/advanced', {$loc_name => loc_value}, 1) %]"
42             class="opac-button">[% l('Clear Form') %]</a>
43     </div>
44
45     <div id='adv_search_filters'>
46         <div class="header_middle">[% l('Search Filters') %]</div>
47
48 [%
49     in_row = 0;
50     FOR adv_chunk IN search.adv_config;
51         NEXT IF adv_chunk.adv_hide;
52         IF in_row == 0;
53             in_row = 1; %]
54             <div id='adv_filter_block'>
55 [%
56         END; %]
57             <div id='adv_filter_block_item'>
58             <div valign='top'[% IF adv_chunk.js_only %]
59                 id='adv_chunk_[% adv_chunk.adv_special %]'
60                 class='hidden'[% END %]>
61                 <strong>[% adv_chunk.adv_label %]</strong><br />
62 [%
63         IF adv_chunk.adv_special;
64             SWITCH adv_chunk.adv_special;
65                 CASE "lib_selector";
66                     PROCESS "opac/parts/org_selector.tt2";
67                         INCLUDE build_org_selector show_loc_groups=1 id="adv_org_selector" %]
68                             <div class="adv_search_available">
69                                 <input type='checkbox' name="modifier"
70                                     value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
71                                     id='opac.result.limit2avail' />
72                                 <label for='opac.result.limit2avail'>
73                                     [% l("Limit to Available") %]</label>
74                             </div>
75 [%
76                 CASE "pub_year"; %]
77                             <select name='pubdate' onchange='
78                                 if(this.selectedIndex == 3)
79                                     unHideMe($("adv_global_pub_date_2_span"));
80                                 else
81                                     hideMe($("adv_global_pub_date_2_span"));'>
82                                     [%  FOR opt IN [
83                                             {"code" => "is", "label" => l("Is")},
84                                             {"code" => "before", "label" => l("Before")},
85                                             {"code" => "after", "label" => l("After")},
86                                             {"code" => "between", "label" => l("Between")} ] %]
87                                         <option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
88                                     [%  END %]
89                             </select>    
90                             <br/>
91                             <div id='adv_special_block'>
92                                 <input name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
93                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
94                                    [% l("and") %] <input name='date2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
95                                 </span>
96                             </div>
97 [%
98                 CASE "sort_selector";
99                     INCLUDE "opac/parts/filtersort.tt2"
100                         value=CGI.param('sort') class='results_header_sel';
101
102                 CASE "copy_location" %]
103                     <select id="adv_copy_location_selector" 
104                         aria-label="[% l('Select Shelving Location') %]"
105                         name="fi:locations" size="3" multiple="multiple">
106                     </select>
107                 [% 
108             END;
109         ELSIF adv_chunk.adv_attr;
110             INCLUDE "opac/parts/coded_value_selector.tt2"
111                 attr=adv_chunk.adv_attr multiple="multiple" size=adv_chunk.adv_size || search.default_adv_select_height || "4";
112         ELSIF adv_chunk.adv_filter;
113             INCLUDE "opac/parts/filter_group_selector.tt2"
114                 filter_group=adv_chunk.adv_filter multiple="multiple" size=adv_chunk.adv_size || search.default_adv_select_height || "4";
115         END; %]
116             </div>
117         </div>
118 [%
119         IF adv_chunk.adv_break;
120             in_row = 0; %]
121             </div>
122 [%
123         END;
124     END; %]
125
126             </div>
127         </div>
128     </div>
129 </div>
130 </form>