LP#1167541: Use Patron home org for pickup lib instead of staff's
[working/Evergreen.git] / Open-ILS / src / templates / staff / share / t_fm_record_editor.tt2
1 <form role="form" class="form-validated eg-edit-fm-record">
2
3   <div class="modal-header">
4     <button type="button" class="close"
5       ng-click="cancel()" aria-hidden="true">&times;</button>
6     <h4 class="modal-title">{{record_label}}</h4>
7   </div>
8   <div class="modal-body">
9     <div class="form-group row" ng-repeat="field in fields | filter:{virtual:'!true'}">
10       <div class="col-md-3">
11         <label for="rec-{{field.name}}">{{field.label}}</label>
12       </div>
13       <div class="col-md-9">
14         <span  ng-if="field.datatype == 'id'">{{rec[field.name]()}}</span>
15         <input ng-if="field.datatype == 'text'"
16           ng-readonly="field.readonly"
17           ng-required="field.is_required()"
18           ng-model="rec[field.name]"
19           ng-model-options="{ getterSetter : true }">
20         </input>
21         <input ng-if="field.datatype == 'int'"
22           type="number"
23           ng-readonly="field.readonly"
24           ng-required="field.is_required()"
25           ng-model="rec[field.name]"
26           ng-model-options="{ getterSetter : true }">
27         </input>
28         <input ng-if="field.datatype == 'float'"
29           type="number" step="0.1"
30           ng-readonly="field.readonly"
31           ng-required="field.is_required()"
32           ng-model="rec[field.name]"
33           ng-model-options="{ getterSetter : true }">
34         </input>
35         <input ng-if="field.datatype == 'bool'"
36           type="checkbox"
37           ng-readonly="field.readonly"
38           ng-model="rec[field.name]"
39           ng-model-options="{ getterSetter : true }">
40         </input>
41         <span ng-if="field.datatype == 'link'"
42           ng-class="{nullable : !field.is_required()}">
43           <select ng-if="field.datatype == 'link'"
44             ng-readonly="field.readonly"
45             ng-required="field.is_required()"
46             ng-options="item.id as item.name for item in field.linked_values"
47             ng-model="rec[field.name]"
48             ng-model-options="{ getterSetter : true }">
49           </select>
50         </span>
51         <eg-org-selector ng-if="field.datatype == 'org_unit'"
52           selected="rec_orgs[field.name]()"
53           onchange="rec_orgs[field.name]">
54         </eg-org-selector>
55       </div>
56     </div>
57   </div>
58   <div class="modal-footer">
59     <button class="btn btn-primary" ng-click="ok()">[% l('Save') %]</button>
60     <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
61   </div>
62 </form>