Bugzilla – Attachment 116491 Details for
Bug 27634
Turn off patron self-registration if no default category is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27634: Fix Link on the OPAC main page
Bug-27634-Fix-Link-on-the-OPAC-main-page.patch (text/plain), 2.40 KB, created by
Jonathan Druart
on 2021-02-08 10:32:49 UTC
(
hide
)
Description:
Bug 27634: Fix Link on the OPAC main page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-08 10:32:49 UTC
Size:
2.40 KB
patch
obsolete
>From 9dbf5bd79d86727bbb9c7f1baf5ef550d329bc79 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Feb 2021 11:30:39 +0100 >Subject: [PATCH] Bug 27634: Fix Link on the OPAC main page > >Make sure the pref is filled with a valid patron's category to display >the "register" link >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- > opac/opac-main.pl | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index f2ccf82271..3a4947ddc5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -204,7 +204,7 @@ > <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p> > </div> > [% END %] >- [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %] >+ [% IF self_registration_enabled %] > <div id="patronregistration-main" class="patronregistration"> > <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p> > </div> >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index af0377f483..57f44349cb 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -30,6 +30,7 @@ use C4::Overdues; > use Koha::Checkouts; > use Koha::Holds; > use Koha::News; >+use Koha::Patron::Categories; > use Koha::Patron::Messages; > > my $input = CGI->new; >@@ -103,10 +104,13 @@ if ( $patron ) { > } > } > >+my $PatronSelfRegistrationDefaultCategory = C4::Context->preference('PatronSelfRegistrationDefaultCategory'); >+my $self_registration_enabled = $PatronSelfRegistrationDefaultCategory && Koha::Patron::Categories->find($PatronSelfRegistrationDefaultCategory); > $template->param( > koha_news => $all_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; >-- >2.20.1
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 27634
:
116378
|
116379
|
116380
|
116381
|
116382
|
116383
|
116491
|
145599
|
145600
|
145601
|
145602
|
145603
|
145604
|
145605
|
145922
|
147531
|
147532
|
147533
|
147534
|
147535
|
147536
|
147537
|
149746
|
149747
|
149748
|
149896
|
149897
|
149898
|
149899
|
149900
|
149901
|
149902
|
150083
|
150084
|
150085
|
150086
|
150087
|
150088
|
150089
|
150090
|
151046
|
151047
|
151048
|
151049
|
155863
|
155864
|
155865
|
155866
|
155867
|
155868
|
155869
|
155870
|
156203