LP#1676608: copy alert and suppression matrix
[working/Evergreen.git] / Open-ILS / src / templates / staff / share / t_copy_alert_editor_dialog.tt2
1 <form ng-submit="ok(copy_alert)" role="form">
2     <div class="modal-header">
3       <button type="button" class="close" ng-click="cancel()" 
4         aria-hidden="true">&times;</button>
5       <h4 class="modal-title">[% l('Manage Copy Alerts') %]</h4>
6     </div>
7     <div class="modal-body">
8       <div class="row" ng-repeat="a in copy_alert_list" ng-init="temp = (a.temp() == 't'); note = a.note(); acked = (a.ack_time() !== null); alert_type = a.alert_type().id()">
9         <div class="col-md-12">
10           <div class="row">
11             <div class="col-md-6 form-inline">
12               <label for="copy-alert-type-select-{{a.id()}}">[% l('Type') %]</label>
13               <select id="copy-alert-type-select-{{a.id()}}" class="form-control"
14                       ng-model="alert_type"
15                       ng-change="a.alert_type(alert_type) && a.ischanged(1)"
16                       ng-options="at.id() as at.name() for at in alert_types">
17               </select>
18             </div>
19             <div class="col-md-3">
20               <label>
21                 <input type="checkbox" ng-model="temp" ng-change="a.temp(temp ? 't' : 'f') && a.ischanged(1)" ng-disabled="acked"/>
22                 [% l('Temporary') %]
23               </label>
24             </div>
25             <div class="col-md-3">
26               <label>
27                 <input type="checkbox" ng-model="acked" ng-change="(acked ? a.ack_time('now') : a.ack_time(null)) && a.ischanged(1)"/>
28                 [% l('Clear?') %]
29               </label>
30             </div>
31           </div>
32           <div class="row pad-vert">
33             <div class="col-md-12">
34               <textarea class="form-control" ng-change="a.note(note) && a.ischanged(1)"
35                 ng-model="note" placeholder="[% l('Alert...') %]" ng-disabled="acked">
36               </textarea>
37             </div>
38           </div>
39           <div class="row">
40             <div class="col-md-12">
41               <hr/>
42             </div>
43           </div>
44         </div>
45       </div>
46     </div>
47     <div class="modal-footer">
48       <div class="row">
49         <div class="col-md-10 pull-right">
50           <input type="submit" class="btn btn-primary" value="[% l('OK') %]"/>
51           <button class="btn btn-warning" ng-click="cancel($event)">[% l('Cancel') %]</button>
52         </div>
53       </div>
54     </div>
55 </form>