]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/staff/share/t_patron_search_form.tt2
LP1830387 Add access to juvenile flag in print templates
[Evergreen.git] / Open-ILS / src / templates / staff / share / t_patron_search_form.tt2
1
2 <!-- TODO: inputs need sr-only labels
3    <label class="sr-only" for="input-id">label</label>
4 -->
5
6 <div class="row" id="patron-search-form-row">
7   <div class="col-md-11">
8     <form ng-submit="search(searchArgs)" id="patron-search-form" 
9         role="form" class="form-horizontal">
10
11       <div class="form-group">
12
13         <div class="col-md-2">
14           <input type="text" class="form-control" 
15             aria-label="[% l('Last Name') %]"
16             focus-me="focusMe"
17             ng-model="searchArgs.family_name" placeholder="[% l('Last Name') %]"/>
18         </div>
19
20         <div class="col-md-2">
21           <input type="text" class="form-control" 
22             aria-label="[% l('First Name') %]"
23             ng-model="searchArgs.first_given_name" placeholder="[% l('First Name') %]"/>
24         </div>
25
26         <div class="col-md-2">
27           <input type="text" class="form-control" 
28             aria-label="[% l('Middle Name') %]"
29             ng-model="searchArgs.second_given_name" placeholder="[% l('Middle Name') %]"/>
30         </div>
31
32         <div class="col-md-2">
33           <input type="text" class="form-control" ng-model="searchArgs.name"
34             aria-label="[% l('Name Keywords') %]"
35             placeholder="[% l('Name Keywords') %]" title="[% l('Name Keywords') %]"/>
36         </div>
37
38         <div class="col-md-2" ng-mouseover="setLastFormElement()">
39           <input type="submit" class="btn btn-primary" value="[% l('Search') %]"
40             aria-label="[% l('Search') %]"/>
41         </div>
42
43
44         <div class="col-md-2">
45           <button class="btn btn-default" ng-click="applyShowExtras($event, true)" 
46             ng-mouseover="setLastFormElement()" aria-label="[% l('Show More Fields') %]"
47             title="[% l('Show More Fields') %]" ng-show="!showExtras">
48             <span class="glyphicon glyphicon-circle-arrow-down"></span>
49           </button>
50           <button class="btn btn-default" ng-click="applyShowExtras($event, false)" 
51             ng-mouseover="setLastFormElement()" aria-label="[% l('Show Fewer Fields') %]"
52             title="[% l('Show Fewer Fields') %]" ng-show="showExtras">
53             <span class="glyphicon glyphicon-circle-arrow-up"></span>
54           </button>
55         </div>
56       </div>
57
58       <div class="form-group" ng-show="showExtras">
59         <div class="col-md-2">
60           <input type="text" class="form-control" aria-label="[% l('Barcode') %]"
61             ng-model="searchArgs.card"
62             placeholder="[% l('Barcode') %]"/>
63         </div>
64         <div class="col-md-2">
65           <input type="text" class="form-control" aria-label="[% l('Alias') %]"
66             ng-model="searchArgs.alias" placeholder="[% l('Alias') %]"/>
67         </div>
68         <div class="col-md-2">
69           <input type="text" class="form-control" aria-label="[% l('Username') %]"
70             ng-model="searchArgs.usrname" placeholder="[% l('Username') %]"/>
71         </div>
72         <div class="col-md-2">
73           <input type="text" class="form-control" aria-label="[% l('Email') %]"
74             ng-model="searchArgs.email" placeholder="[% l('Email') %]"/>
75         </div>
76         <div class="col-md-2" ng-mouseover="setLastFormElement()">
77           <input type="reset" class="btn btn-primary" ng-click="clearForm()" 
78             aria-label="[% l('Clear Form') %]" value="[% l('Clear Form') %]"/>
79         </div>
80       </div>
81
82       <div class="form-group" ng-show="showExtras">
83         <div class="col-md-2">
84           <input type="text" class="form-control" aria-label="[% l('Identification') %]"
85             ng-model="searchArgs.ident" placeholder="[% l('Identification') %]"/>
86         </div>
87
88         <div class="col-md-2">
89           <input type="text" class="form-control" aria-label="[% l('Phone') %]"
90             ng-model="searchArgs.phone" placeholder="[% l('Phone') %]"/>
91         </div>
92         <div class="col-md-2">
93           <input type="text" class="form-control" aria-label="[% l('Street 1') %]"
94             ng-model="searchArgs.street1" placeholder="[% l('Street 1') %]"/>
95         </div>
96         <div class="col-md-2">
97           <input type="text" class="form-control" aria-label="[% l('Street 2') %]"
98             ng-model="searchArgs.street2" placeholder="[% l('Street 2') %]"/>
99         </div>
100         <div class="col-md-2">
101           <input type="text" class="form-control" aria-label="[% l('City') %]"
102             ng-model="searchArgs.city" placeholder="[% l('City') %]"/>
103         </div>
104       </div>
105
106       <div class="form-group" ng-show="showExtras">
107         <div class="col-md-2">
108           <input type="text" class="form-control" ng-model="searchArgs.state" 
109             aria-label="[% l('State') %]"
110             placeholder="[% l('State') %]" title="[% l('State') %]"/>
111         </div>
112
113         <div class="col-md-2">
114           <input type="text" class="form-control" ng-model="searchArgs.post_code" 
115             aria-label="[% l('Post Code') %]"
116             placeholder="[% l('Post Code') %]" title="[% l('Post Code') %]"/>
117         </div>
118
119         <div class="col-md-2">
120           <!--
121           <input type="text" class="form-control"  
122             placeholder="[% l('Profile Group') %]"
123             ng-model="searchArgs.profile"
124             typeahead="grp as grp.name for grp in profiles | filter:$viewValue" 
125             typeahead-editable="false" />
126             -->
127
128             <div class="btn-group patron-search-selector" uib-dropdown>
129               <button type="button" class="btn btn-default" uib-dropdown-toggle>
130                 <span style="padding-right: 5px;">{{searchArgs.profile.name() || "[% l('Profile Group') %]"}}</span>
131                 <span class="caret"></span>
132               </button>
133               <ul class="scrollable-menu" uib-dropdown-menu>
134                 <li ng-repeat="grp in profiles">
135                   <a href
136                     style="padding-left: {{pgt_depth(grp) * 10 + 5}}px"
137                     ng-click="searchArgs.profile = grp">{{grp.name()}}</a>
138                 </li>
139               </ul>
140             </div>
141         </div>
142
143         <div class="col-md-2">
144           <eg-org-selector label="[% l('Home Library') %]" org-aria="[% l('Home Library') %]"
145             selected="searchArgs.home_ou" sticky-setting="eg.circ.patron.search.ou">
146           </eg-org-selector>
147         </div>
148
149         <div class="col-md-2">
150           <input type="text" class="form-control" aria-label="[% l('Parent/Guardian') %]"
151             ng-model="searchArgs.guardian" placeholder="[% l('Parent/Guardian') %]"/>
152         </div>
153       </div>
154       <div class="form-group" ng-show="showExtras">
155         <div class="col-md-2">
156             <input type="text" class="form-control" ng-model="searchArgs.dob_year"
157             aria-label="[% l('DOB Year') %]"
158             placeholder="[% l('DOB Year') %]" title="[% l('DOB Year') %]"/>
159         </div>
160         <div class="col-md-2">
161             <input type="text" class="form-control" ng-model="searchArgs.dob_month"
162             aria-label="[% l('DOB Month') %]"
163             placeholder="[% l('DOB Month') %]" title="[% l('DOB Month') %]"/>
164         </div>
165         <div class="col-md-2">
166             <input type="text" class="form-control" ng-model="searchArgs.dob_day"
167             aria-label="[% l('DOB Day') %]"
168             placeholder="[% l('DOB Day') %]" title="[% l('DOB Day') %]"/>
169         </div>
170         <div class="col-md-2">
171           <input type="text" class="form-control" aria-label="[% l('Database ID') %]"
172             ng-model="searchArgs.id" placeholder="[% l('Database ID') %]"/>
173         </div>
174         <div class="col-md-2">
175           <div class="checkbox">
176             <label id="includeInactive">
177               <input type="checkbox" aria-labelledby="includeInactive"
178                 ng-model="searchArgs.inactive" ng-change="onSearchInactiveChanged()"/>
179               [% l('Include Inactive?') %]
180             </label>
181           </div>
182         </div>
183       </div>
184     </form>
185   </div>
186 </div>