Bug 40803: Use submit form link to submit renewals from overdue items tab in opac user account

To test:
1 - Check out an item to a patron, backdated to be overdue
2 - Log in as that user to the OPAC
3 - From 'Your summary' - click the overdue tab, click renew
4 - 500 Error
5 - Apply patch
6 - Reload the page and repeat
7 - Success!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0219e4baf8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Nick Clemens 2025-09-12 17:15:17 +00:00 committed by Paul Derscheid
parent 755c0fe1b7
commit 75e25b4699
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 11 additions and 1 deletions

View File

@ -784,7 +784,17 @@
Account frozen
[% ELSIF ( OVERDUE.status ) %]
[% IF ( canrenew ) %]
<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber | uri %]&amp;bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
<input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]" />
<a
class="submit-form-link"
href="#"
data-method="post"
data-action="/cgi-bin/koha/opac-renew.pl?from=opac_user"
data-issue="[% ISSUE.issue_id | html %]"
data-borrowernumber="[% ISSUE.borrowernumber | html %]"
data-op="cud-renew"
>Renew</a
>
[% END %]
<span class="renewals"
>( [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = OVERDUE.renewsleft, renewals_allowed = OVERDUE.renewsallowed }) %]