A hidden field that tracked the page the user was on before placing a hold was
inadvertently removed in another bug fix. As a result, if staff used the link
to place another hold on the same title, they were stuck in a loop where they
couldn't return to the source page after hitting the 'continue' button. This
commit restores that hidden field.
Also provides a fix so that hold labels used in the place another hold link
can be translated.
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
redirect = redirect.replace('^http:', 'https:')
%]
<input type="hidden" name="redirect_to" value="[% redirect | html %]" />
+ <input type="hidden" name="hold_source_page" value="[% CGI.param('hold_source_page') | html %]" />
[%
usr_barcode = CGI.param('usr_barcode') | html;
is_requestor = CGI.param('is_requestor');
<span><a href="[% CGI.param('redirect_to') || CGI.referer | html %]">[% l('Continue') %]</a></span>
[% IF ctx.is_staff %]
[% IF CGI.param('hold_type') == 'C';
- hold_type_label = 'copy';
+ hold_type_label = l('copy');
ELSIF CGI.param('hold_type') == 'V';
- hold_type_label = 'volume';
+ hold_type_label = l('volume');
ELSE;
- hold_type_label = 'title';
+ hold_type_label = l('title');
END %]
<span><a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_source_page => CGI.param('hold_source_page'), bre_id => CGI.param('bre_id')}) %]">
[% l('Place another hold for this ') %] [% hold_type_label %]</a>