@@ -, +, @@
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +-
opac/opac-main.pl | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
@@ -228,7 +228,7 @@
Don't have an account? Register here.
--- a/opac/opac-main.pl
+++ a/opac/opac-main.pl
@@ -28,6 +28,7 @@ use C4::Overdues qw( checkoverdues );
use Koha::Checkouts;
use Koha::Holds;
use Koha::AdditionalContents;
+use Koha::Patron::Categories;
use Koha::Patron::Messages;
my $input = CGI->new;
@@ -108,10 +109,13 @@ if ( $patron ) {
}
}
+my $PatronSelfRegistrationDefaultCategory = C4::Context->preference('PatronSelfRegistrationDefaultCategory');
+my $self_registration_enabled = $PatronSelfRegistrationDefaultCategory && Koha::Patron::Categories->find($PatronSelfRegistrationDefaultCategory);
$template->param(
koha_news => $koha_news,
branchcode => $homebranch,
daily_quote => Koha::Quotes->get_daily_quote(),
+ self_registration_enabled => $self_registration_enabled,
);
output_html_with_http_headers $input, $cookie, $template->output;
--