LP#1676608: copy alert and suppression matrix
[working/Evergreen.git] / Open-ILS / src / templates / staff / admin / local / autoGridEditor / ccat.tt2
1 [% ctx.page_title = l("Copy Alert Types"); %]
2 <!-- use <form> so we get submit-on-enter for free -->
3 <form class="form-validated" novalidate name="form" ng-submit="ok(record)">
4   <div>
5     <div class="modal-header">
6       <button type="button" class="close" 
7         ng-click="cancel()" aria-hidden="true">&times;</button>
8       <h4 ng-if="creating"  class="modal-title">[% l('Create copy alert type') %]</h4>
9       <h4 ng-if="!creating" class="modal-title">[% l('Update copy alert type') %]</h4>
10     </div>
11     <div class="modal-body">
12       <div class="form-group">
13         <label for="edit-alert-name">[% l('Name') %]</label>
14         <input type="text" class="form-control" focus-me='focusMe' required
15           id="edit-alert-name" ng-model="record.name" placeholder="[% l('Name...') %]"/>
16       </div>
17       <div class="form-group">
18         <label for="active-selector">[% l('Active') %]</label>
19         <select id="active-selector" class="form-control" ng-model="record.active">
20             <option value="t">[% l('Yes') %]</option>
21             <option value="f">[% l('No') %]</option>
22         </select>
23       </div>
24       <div class="form-group">
25         <label for="state-selector">[% l('State') %]</label>
26         <select id="state-selector" class="form-control" ng-model="record.state">
27             <option value="NORMAL">[% l('Normal') %]</option>
28             <option value="LOST">[% l('Lost') %]</option>
29             <option value="LOST_AND_PAID">[% l('Lost and paid for') %]</option>
30             <option value="LONGOVERDUE">[% l('Long Overdue') %]</option>
31             <option value="MISSING">[% l('Missing') %]</option>
32             <option value="DAMAGED">[% l('Damaged') %]</option>
33             <option value="CLAIMSRETURNED">[% l('Claims returned') %]</option>
34             <option value="CLAIMSNEVERCHECKEDOUT">[% l('Claims never checked out') %]</option>
35         </select>
36       </div>
37       <div class="form-group nullable">
38         <label for="event-selector">[% l('Event') %]</label>
39         <select id="event-selector" class="form-control" ng-model="record.event"
40           ng-init="event_list = [{l:'[% l('Checkin') %]',v:'CHECKIN'},{l:'[% l('Checkout') %]',v:'CHECKOUT'}]"
41           ng-options="e.v as e.l for e in event_list">
42             <option value="">[% l('Any Event') %]</option>
43         </select>
44       </div>
45       <div class="form-group">
46         <label for="select-org-unit">[% l('Scope Org Unit') %]</label>
47         <eg-org-selector selected="record.scope_org"></eg-org-selector>
48       </div>
49       <div class="form-group">
50         <label for="edit-alert-next-statuses">[% l('Next Status') %]</label>
51         <select id="edit-alert-next-statuses" class="form-control" focus-me='focusMe'
52                 multiple="multiple" ng-model="record.next_status">
53             <option ng-repeat="s in ccs" value="{{s.id()}}">{{s.name()}}</option>
54         </select>
55       </div>
56       <div class="form-group">
57         <label for="inrenew-selector">[% l('Renewing?') %]</label>
58         <select id="inrenew-selector" class="form-control" ng-model="record.in_renew">
59             <option value="">[% l('Any') %]</option>
60             <option value="t">[% l('Yes') %]</option>
61             <option value="f">[% l('No') %]</option>
62         </select>
63       </div>
64       <div class="form-group">
65         <label for="invert-location-selector">[% l('Invert location?') %]</label>
66         <select id="invert-location-selector" class="form-control" ng-model="record.invert_location">
67             <option value="t">[% l('Yes') %]</option>
68             <option value="f">[% l('No') %]</option>
69         </select>
70       </div>
71       <div class="form-group">
72         <label for="at-circ-selector">[% l('At Circulation Library?') %]</label>
73         <select id="at-circ-selector" class="form-control" ng-model="record.at_circ">
74             <option value="">[% l('Do not care') %]</option>
75             <option value="t">[% l('Yes') %]</option>
76         </select>
77       </div>
78       <div class="form-group">
79         <label for="at-owning-selector">[% l('At Owning Library?') %]</label>
80         <select id="at-owning-selector" class="form-control" ng-model="record.at_owning">
81             <option value="">[% l('Do not care') %]</option>
82             <option value="t">[% l('Yes') %]</option>
83         </select>
84       </div>
85     </div>
86     <div class="modal-footer">
87       <input type="submit" ng-disabled="form.$invalid" 
88           class="btn btn-primary" value="[% l('Save') %]"/>
89       <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
90     </div>
91   </div> <!-- modal-content -->
92 </form>