If the user attempts to suspend a captured hold via batch hold update,
warn that user af the update the some holds may not have been suspended
and why.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
push(@$vlist, $vals);
}
- $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
+ my $resp = $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
+ $self->ctx->{hold_suspend_post_capture} = 1 if
+ grep {$U->event_equals($_, 'HOLD_SUSPEND_AFTER_CAPTURE')} @$resp;
+
} elsif ($action eq 'edit') {
my @vals = map {
alt="Holds Help"
src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
</td>
+ <td style="padding-left:5px;" class='error'>
+ [% IF ctx.hold_suspend_post_capture;
+ l('One or more holds could not be suspended because<br/>the item is at (or en route to) the pickup library.');
+ END;
+ %]
+ </td>
<td align="right">
[% l("Show") %]
[% IF CGI.param("available") %]