Bug 19053: Keep auto_renew flag if a confirmation is needed
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 7 Aug 2017 16:50:32 +0000 (13:50 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Aug 2017 15:17:39 +0000 (12:17 -0300)
If an item is checked out with the auto renewal flag and a confirmation
is needed (holds exist, past due date, etc.) the auto renewal flag will
get lost.

Test plan:
- Check an item out and specify a past due date
- Confirm the checkout on the confirmation screen
=> Without this patch the checkout is not marked as auto renewal
=> With this patch applied the auto renewal flag will be set to the
checkout

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

index fad8623..7e9a500 100755 (executable)
@@ -397,6 +397,7 @@ if (@$barcodes) {
                 $template_params->{getBarcodeMessageIteminfo} = $item->barcode;
                 $template_params->{NEEDSCONFIRMATION} = 1;
                 $template_params->{onsite_checkout} = $onsite_checkout;
+                $template_params->{auto_renew} = $session->param('auto_renew');
                 $confirm_required = 1;
             }
         }
index ed054ae..6d6b91f 100644 (file)
@@ -371,6 +371,7 @@ $(document).ready(function() {
     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
     [% END %]
     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
+    <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
 </form>
 [% END %]