Bugzilla – Attachment 57505 Details for
Bug 17522
opac-user.pl gives error of OpacRenewalAllowed is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set
Bug-17522-Fix-opac-userpl-if-OpacRenewalAllowed-is.patch (text/plain), 5.51 KB, created by
Tomás Cohen Arazi
on 2016-11-15 15:48:48 UTC
(
hide
)
Description:
Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2016-11-15 15:48:48 UTC
Size:
5.51 KB
patch
obsolete
>From c6f47a6307cc7ca4a78ab0f10d53934d51aca142 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 Nov 2016 08:44:54 +0000 >Subject: [PATCH] Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set > >This patch fixes a bug added by commit 81a04af27804621609004dc370284413baa5caa2 > Bug 14610 - Add and update scripts > >If OpacRenewalAllowed is enabled, the following error message is >displayed: > >Template process failed: undef error - The method is_expired is not >covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. > >The is_expired and BlockExpiredPatronOpacActions methods did not exist >for the Koha::Patron object. These 2 values were returned by >GetMemberDetails. > >To fix this, we need bug 17579 which introduces the >Koha::Patron->is_expired method and also bug 17604 for the >Koha::Patron->effective_BlockExpiredPatronOpacActions. > >Test Plan: >1) Check out an item for a patron >2) Enable OpacRenewalAllowed >3) Log in as that patron, go to opac-user.pl >4) Note the error >5) Apply this patch >6) Reload opac-user.pl >7) Page should now load! > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 5cb3239..47f3b4d6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -156,7 +156,7 @@ Using this account is not recommended because some parts of Koha will not functi > <th>Barcode</th> > [% END %] > <th>Call no.</th> >- [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] >+ [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %] > <th class="nosort">Renew</th> > [% END %] > [% IF ( OPACFinesTab ) %] >@@ -245,7 +245,7 @@ Using this account is not recommended because some parts of Koha will not functi > <span class="tdlabel">Call no.:</span> > [% ISSUE.itemcallnumber %] > </td> >- [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] >+ [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %] > <td class="renew"> > [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %] > [% IF ( ISSUE.status ) %] >@@ -287,12 +287,12 @@ Using this account is not recommended because some parts of Koha will not functi > [% END # /FOREACH ISSUES %] > </tbody> > </table> >- [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] >+ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %] > <input type="submit" class="btn" value="Renew selected" /> > [% END %] > </form> > >- [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] >+ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %] > <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post"> > <input type="hidden" name="from" value="opac_user" /> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >@@ -878,7 +878,7 @@ Using this account is not recommended because some parts of Koha will not functi > e.preventDefault(); > $("#renewall").submit(); > }); >- [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] >+ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %] > $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>"); > [% END %] > [% END %] >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17522
:
56999
|
57047
|
57048
|
57102
|
57414
|
57415
|
57478
| 57505