]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/staff/admin/local/autoGridEditor/ccat.tt2
LP#1538691: Use items instead of copies
[working/Evergreen.git] / Open-ILS / src / templates / staff / admin / local / autoGridEditor / ccat.tt2
1 [% ctx.page_title = l("Item 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 item alert type') %]</h4>
9       <h4 ng-if="!creating" class="modal-title">[% l('Update item 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                 ng-disabled="record.event != 'CHECKIN'">
54             <option ng-repeat="s in ccs" value="{{s.id()}}">{{s.name()}}</option>
55         </select>
56       </div>
57       <div class="form-group">
58         <label for="inrenew-selector">[% l('Renewing?') %]</label>
59         <select id="inrenew-selector" class="form-control" ng-model="record.in_renew">
60             <option value="">[% l('Any') %]</option>
61             <option value="t">[% l('Yes') %]</option>
62             <option value="f">[% l('No') %]</option>
63         </select>
64       </div>
65       <div class="form-group">
66         <label for="invert-location-selector">[% l('Invert location?') %]</label>
67         <select id="invert-location-selector" class="form-control" ng-model="record.invert_location">
68             <option value="t">[% l('Yes') %]</option>
69             <option value="f">[% l('No') %]</option>
70         </select>
71       </div>
72       <div class="form-group">
73         <label for="at-circ-selector">[% l('Allow Only At Circulation Library?') %]</label>
74         <select id="at-circ-selector" class="form-control" ng-model="record.at_circ">
75             <option value="">[% l('No') %]</option>
76             <option value="t">[% l('Yes') %]</option>
77         </select>
78       </div>
79       <div class="form-group">
80         <label for="at-owning-selector">[% l('Allow Only At Owning Library?') %]</label>
81         <select id="at-owning-selector" class="form-control" ng-model="record.at_owning">
82             <option value="">[% l('No') %]</option>
83             <option value="t">[% l('Yes') %]</option>
84         </select>
85       </div>
86     </div>
87     <div class="modal-footer">
88       <input type="submit" ng-disabled="form.$invalid" 
89           class="btn btn-primary" value="[% l('Save') %]"/>
90       <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
91     </div>
92   </div> <!-- modal-content -->
93 </form>