bcbda5a0a94a1dfa4b0028f48956dbc1f78d25fd
[working/Evergreen.git] / Open-ILS / src / templates / staff / circ / patron / t_search.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             focus-me="focusMe"
16             ng-model="searchArgs.family_name" placeholder="[% l('Last Name') %]"/>
17         </div>
18
19         <div class="col-md-2">
20           <input type="text" class="form-control" 
21             ng-model="searchArgs.first_given_name" placeholder="[% l('First Name') %]"/>
22         </div>
23
24         <div class="col-md-2">
25           <input type="text" class="form-control" 
26             ng-model="searchArgs.second_given_name" placeholder="[% l('Middle Name') %]"/>
27         </div>
28
29         <div class="col-md-2" ng-mouseover="setLastFormElement()">
30           <input type="submit" class="btn btn-primary" value="[% l('Search') %]"/>
31         </div>
32
33         <div class="col-md-2" ng-mouseover="setLastFormElement()">
34           <input type="reset" class="btn btn-primary" ng-click="clearForm()" 
35             value="[% l('Clear Form') %]"/>
36         </div>
37
38         <div class="col-md-2">
39           <button class="btn btn-default" ng-click="applyShowExtras($event, true)" 
40             ng-mouseover="setLastFormElement()"
41             title="[% l('Show More Fields') %]" ng-show="!showExtras">
42             <span class="glyphicon glyphicon-circle-arrow-down"></span>
43           </button>
44           <button class="btn btn-default" ng-click="applyShowExtras($event, false)" 
45             ng-mouseover="setLastFormElement()"
46             title="[% l('Show Fewer Fields') %]" ng-show="showExtras">
47             <span class="glyphicon glyphicon-circle-arrow-up"></span>
48           </button>
49         </div>
50       </div>
51
52       <div class="form-group" ng-show="showExtras">
53         <div class="col-md-2">
54           <input type="text" class="form-control" ng-model="searchArgs.card" 
55             placeholder="[% l('Barcode') %]"/>
56         </div>
57         <div class="col-md-2">
58           <input type="text" class="form-control" 
59             ng-model="searchArgs.alias" placeholder="[% l('Alias') %]"/>
60         </div>
61         <div class="col-md-2">
62           <input type="text" class="form-control" 
63             ng-model="searchArgs.usrname" placeholder="[% l('Username') %]"/>
64         </div>
65         <div class="col-md-2">
66           <input type="text" class="form-control" 
67             ng-model="searchArgs.email" placeholder="[% l('Email') %]"/>
68         </div>
69         <div class="col-md-2">
70           <input type="text" class="form-control" 
71             ng-model="searchArgs.ident" placeholder="[% l('Identification') %]"/>
72         </div>
73       </div>
74
75       <div class="form-group" ng-show="showExtras">
76         <div class="col-md-2">
77           <input type="text" class="form-control" 
78             ng-model="searchArgs.id" placeholder="[% l('Database ID') %]"/>
79         </div>
80         <div class="col-md-2">
81           <input type="text" class="form-control" 
82             ng-model="searchArgs.phone" placeholder="[% l('Phone') %]"/>
83         </div>
84         <div class="col-md-2">
85           <input type="text" class="form-control" 
86             ng-model="searchArgs.street1" placeholder="[% l('Street 1') %]"/>
87         </div>
88         <div class="col-md-2">
89           <input type="text" class="form-control" 
90             ng-model="searchArgs.street2" placeholder="[% l('Street 2') %]"/>
91         </div>
92         <div class="col-md-2">
93           <input type="text" class="form-control" 
94             ng-model="searchArgs.city" placeholder="[% l('City') %]"/>
95         </div>
96       </div>
97
98       <div class="form-group" ng-show="showExtras">
99         <div class="col-md-2">
100           <input type="text" class="form-control" ng-model="searchArgs.state" 
101             placeholder="[% l('State') %]" title="[% l('State') %]"/>
102         </div>
103
104         <div class="col-md-2">
105           <input type="text" class="form-control" ng-model="searchArgs.post_code" 
106             placeholder="[% l('Post Code') %]" title="[% l('Post Code') %]"/>
107         </div>
108
109         <div class="col-md-2">
110           <!--
111           <input type="text" class="form-control"  
112             placeholder="[% l('Profile Group') %]"
113             ng-model="searchArgs.profile"
114             typeahead="grp as grp.name for grp in profiles | filter:$viewValue" 
115             typeahead-editable="false" />
116             -->
117
118             <div class="btn-group patron-search-selector" uib-dropdown>
119               <button type="button" class="btn btn-default" uib-dropdown-toggle>
120                 <span style="padding-right: 5px;">{{searchArgs.profile.name() || "[% l('Profile Group') %]"}}</span>
121                 <span class="caret"></span>
122               </button>
123               <ul uib-dropdown-menu>
124                 <li ng-repeat="grp in profiles">
125                   <a href
126                     style="padding-left: {{pgt_depth(grp) * 10 + 5}}px"
127                     ng-click="searchArgs.profile = grp">{{grp.name()}}</a>
128                 </li>
129               </ul>
130             </div>
131         </div>
132
133         <div class="col-md-2">
134           <eg-org-selector label="[% l('Home Library') %]" 
135             selected="searchArgs.home_ou">
136           </eg-org-selector>
137         </div>
138
139         <div class="col-md-2">
140           <div class="checkbox">
141             <label>
142               <input type="checkbox" ng-model="searchArgs.inactive"/>
143               [% l('Include Inactive?') %]
144             </label>
145           </div>
146         </div>
147       </div>
148     </form>
149   </div>
150 </div>
151
152
153 <br/>
154 <div class="row">
155   <div class="col-md-12">
156     [% INCLUDE 'staff/circ/patron/t_search_results.tt2' %]
157   </div>
158 </div>
159
160