Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt
Aleisha 853d3cfe4d Bug 15823: Can still access patron discharge slip without having the syspref on
EDIT: Fix for OPAC side
EDIT: Comment 10
EDIT: Merge conflicts

To test:
1) Ensure syspref useDischarge is disabled
2) Go to /cgi-bin/koha/members/discharge.pl?borrowernumber=X&discharge=1
3) Validate that you are still able to generate a discharge slip for this patron
4) Apply patch and refresh page
5) Confirm that you are redirected to the circulation.pl page for the user and that an error message is there.
OPAC SIDE
6) Go to the OPAC
7) Go to /cgi-bin/koha/opac-discharge.pl
8) Confirm you get a message saying discharges are disabled
9) Go to /cgi-bin/koha/opac-discharge.pl?op=request
10) Confirm you see same message

Sponsored-by: Catalyst IT

Followed test plan, works as expected (both staff client and OPAC).
Re-tested, works OK.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-06 04:20:48 +00:00

60 lines
3 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Discharge
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-discharge" class="scrollto">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Discharge</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
<div id="discharge" class="maincontainer">
<h1>Discharge</h1>
[% IF not(Koha.Preference("useDischarge")) %]
Discharges have not been enabled. Please contact the library.
[% ELSE %]
[% FOR message IN messages %]
<div class="dialog [% message.type %]">
[% IF message.code == "unable_to_generate_pdf" %]
An error occurs when generating the pdf file.
Please contact the staff to resolve this problem.
[% END %]
</div>
[% END %]
[% IF success %]
<p>Your discharge request has been sent. Your discharge will be available on this page within a few days.</p>
[% ELSIF available %]
<a href="/cgi-bin/koha/opac-discharge.pl?op=get">Get your discharge</a></li>
[% ELSIF pending %]
<p>Your discharge will be available on this page within a few days.</p>
[% ELSIF has_issues %]
<p>You cannot be discharged, you have issues. Please return items before asking for a discharge.</p>
[% ELSIF not messages %]
<h2>What is a discharge?</h2>
<p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p>
<p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
<a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
[% END %]
[% END %]
</div> <!-- / #discharge -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]