--- /dev/null
+<div>
+ <div class="modal-header">
+ <button type="button" class="close"
+ ng-click="cancel()" aria-hidden="true">×</button>
+ <h4 class="modal-title alert alert-info">[% l('Hold Capture Delayed') %]</h4>
+ </div>
+ <div class="modal-body">[% l('This item could fulfill a hold request but capture has been delayed by policy.') %]</div>
+ <div class="modal-body">[% l('Item Barcode: [_1]','{{copy_barcode}}') %]</div>
+ <div class="modal-footer">
+ [% dialog_footer %]
+ <input type="submit" class="btn btn-primary"
+ ng-click="capture()" value="[% l('Capture') %]"/>
+ <button class="btn btn-warning"
+ ng-click="nocapture()">[% l('Do Not Capture') %]</button>
+ </div>
+</div>
// these events can be overridden by staff during checkin
service.checkin_overridable_events =
service.checkin_suppress_overrides.concat([
+ 'HOLD_CAPTURE_DELAYED', // not technically overridable, but special prompt and param
'TRANSIT_CHECKIN_INTERVAL_BLOCK'
])
switch(evt[0].textcode) {
case 'COPY_ALERT_MESSAGE':
return service.copy_alert_dialog(evt[0], params, options, 'checkin');
+ case 'HOLD_CAPTURE_DELAYED':
+ return service.hold_capture_delay_dialog(evt[0], params, options, 'checkin');
default:
return service.override_dialog(evt, params, options, 'checkin');
}
});
}
+ // action == what action to take if the user confirms the alert
+ service.hold_capture_delay_dialog = function(evt, params, options, action) {
+ if (angular.isArray(evt)) evt = evt[0];
+ return $uibModal.open({
+ templateUrl: './circ/checkin/t_hold_verify',
+ controller:
+ ['$scope','$uibModalInstance','params',
+ function($scope , $uibModalInstance , params) {
+ $scope.copy_barcode = params.copy_barcode;
+ $scope.capture = function() {
+ params.capture = 'capture';
+ $uibModalInstance.close();
+ };
+ $scope.nocapture = function() {
+ params.capture = 'nocapture';
+ $uibModalInstance.close();
+ };
+ $scope.cancel = function() { $uibModalInstance.dismiss(); };
+ }],
+ resolve : {
+ params : function() {
+ return params;
+ }
+ }
+ }).result.then(
+ function(r) {
+ return service[action](params, options);
+ }
+ );
+ }
+
// check the barcode. If it's no good, show the warning dialog
// Resolves on success, rejected on error
service.test_barcode = function(bc) {