diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt index 23f088dca3..d8f5648c81 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -23,9 +23,6 @@

Discharge

- [% IF not(Koha.Preference("useDischarge")) %] - Discharges have not been enabled. Please contact the library. - [% ELSE %] [% FOR message IN messages %]
[% IF message.code == "unable_to_generate_pdf" %] @@ -49,7 +46,6 @@

Warning: 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.

Ask for a discharge [% END %] - [% END %]
diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl index c9dea911c0..605efb7b49 100755 --- a/opac/opac-discharge.pl +++ b/opac/opac-discharge.pl @@ -33,6 +33,11 @@ use Koha::DateUtils; my $input = new CGI; +unless ( C4::Context->preference('useDischarge') ) { + print $input->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + my $op = $input->param("op"); # Getting the template and auth