-<form ng-submit="ok(items)" role="form">
+<form name="batch_receive_form" ng-submit="ok(items)" role="form">
<div class="modal-header">
<button type="button" class="close" ng-click="cancel()"
aria-hidden="true">×</button>
<div class="col-md-2">
<input ng-disabled="bind_or_none($index)" class="form-control" focus-me="$first"
ng-model="item._barcode" type="text" id="item_barcode_{{$index}}"
- eg-enter="focus_next_barcode($index)"/>
+ ng-required="!bind_or_none($index)" eg-enter="focus_next_barcode($index)"/>
</div>
<div class="col-md-1">
<input type="checkbox" ng-disabled="cannot_print($index)" ng-model="item._print_routing_list"/>
<div class="row">
<div class="col-md-8"></div>
<div class="col-md-4">
- <input type="submit" class="btn btn-primary" value='{{ save_label || "[% l('Save') %]" }}'></input>
+ <input type="submit" class="btn btn-primary" ng-disabled="batch_receive_form.$error.required.length" value='{{ save_label || "[% l('Save') %]" }}'></input>
<button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
</div>
</div>
pile_o_promises.push(
egCore.pcrud.retrieve(
'acn', i.unit().call_number()
- ).then(function(cn){ i._call_number = cn.label() })
+ ).then(function(cn){ if (cn.deleted() == 'f') i._call_number = cn.label() })
);
} else {
- if (i.stream().distribution()[mode + '_call_number']()) {
+ if (i.stream().distribution()[mode + '_call_number']() &&
+ i.stream().distribution()[mode + '_call_number']().deleted() == 'f'
+ ) {
i._call_number = i.stream().distribution()[mode + '_call_number']().label();
} else {
pile_o_promises.push(
pile_o_promises.push(egCore.pcrud.search(
'acn',
- {record : bibId, owning_lib : egCore.org.fullPath(egCore.auth.user().ws_ou(), true)},
+ {deleted : 'f', record : bibId, owning_lib : egCore.org.fullPath(egCore.auth.user().ws_ou(), true)},
{},{ atomic : true }
).then(function (list) {
$scope.acn_list = list.map(function(i){return egCore.idl.toHash(i)});