Bug 24171: Preserve auto_renew when triggering itemBarcodeFallbackSearch

The auto_renew parameter is not sent to the template when the popup
triggered by itemBarcodeFallbackSearch is displayed.

Test plan:
- Turn on itemBarcodeFallbackSearch
- Open a patron account
- Check the checkboxes for automatic-renewal
- Search for a title keyword in the checkout input box
- Verify that auto-renewal flag is set

Note for QA: The auto_renew flag will be set in any cases. Should we
expect regression?

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-12-17 12:10:28 +01:00 committed by Joy Nelson
parent 29cabac319
commit 2ed69532c8
2 changed files with 3 additions and 1 deletions

View File

@ -204,6 +204,8 @@ else {
$session->clear('auto_renew');
}
$template->param( auto_renew => $session->param('auto_renew') );
my ($datedue,$invalidduedate);
my $duedatespec_allow = C4::Context->preference('SpecifyDueDate');
@ -427,7 +429,6 @@ if (@$barcodes) {
$template_params->{getTitleMessageIteminfo} = $biblio->title;
$template_params->{getBarcodeMessageIteminfo} = $item->barcode;
$template_params->{NEEDSCONFIRMATION} = 1;
$template_params->{auto_renew} = $session->param('auto_renew');
$confirm_required = 1;
}
}

View File

@ -449,6 +449,7 @@
<input type="hidden" name="branch" value="[% branch | html %]" />
<input type="hidden" name="barcode" value="[% book.barcode | html %]" />
<input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
<input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
<button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
</form>
</td>