);
if($stat and $stat > 0) {
-
# if successful, return the user to the requesting page
$self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
$self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
return Apache2::Const::REDIRECT;
} else {
-
- $ctx->{hold_failed} = 1; # XXX process the events, etc
+ $ctx->{hold_failed} = 1;
}
+ } else { # hold *check* failed
+ $ctx->{hold_failed} = 1; # XXX process the events, etc
+ $ctx->{hold_failed_event} = $allowed->{last_event};
}
# hold permit failed
<form action='place_hold' method='POST'>
Choose a pickup Library [% PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
<input type='Submit'/>
- <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
- <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
- <input type='hidden' name='redirect_to' value='[% ctx.referer %]'/>
+ <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') | html %]'/>
+ <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') | html %]'/>
+ <input type='hidden' name='redirect_to' value='[% ctx.referer | html %]'/>
</form>
[% END %]
</div>
<b>[% l("Checking for possibility of hold fulfillment...") %]</b>
</div>
<div id='holds_box' class='canvas' style='margin-top: 6px;'>
+ [% IF ctx.hold_success %]
+ <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
+ [% ELSIF ctx.hold_failed %]
+ <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
+ [% IF ctx.hold_failed_event %]
+ <div>
+ <strong>Problem:</strong>
+ <span title="[% ctx.hold_failed_event.textcode %]">
+ <em>[% ctx.hold_failed_event.desc ||
+ ctx.hold_failed_event.payload.fail_part ||
+ ctx.hold_failed_event.textcode %]</em>
+ </span>
+ </div>
+ [% END;
+ ELSE %]
<form method="POST">
<br/>
<input type="hidden" name="hold_target"
</p>
<p>* For best possible service, we recommend keeping a printed copy of
your most recent holds list.</p>
+ [% END # ctx.hold_success %]
<table width='90%' border="1" class="hide_me">
<tbody>
<tr>