From c67662b780ab09c8af5bb9323a0e37ab582b2bf6 Mon Sep 17 00:00:00 2001
From: Kyle M Hall
Date: Tue, 11 Sep 2012 10:50:57 -0400
Subject: [PATCH] Bug 7067 - allow patron self registration via the opac - Followup - Hide register link unless PatronSelfRegistrationDefaultCategory is set.
Content-Type: text/plain; charset="utf-8"
---
C4/Auth.pm | 2 ++
koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt | 2 +-
koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index cec68bc..78eb06a 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -458,6 +458,7 @@ sub get_template_and_user {
SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize"),
OPACLocalCoverImages => C4::Context->preference("OPACLocalCoverImages"),
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"),
+ PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
);
$template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
@@ -969,6 +970,7 @@ sub checkauth {
AutoLocation => C4::Context->preference("AutoLocation"),
wrongip => $info{'wrongip'},
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"),
+ PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
);
$template->param( OpacPublic => C4::Context->preference("OpacPublic"));
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt
index b890529..6a6e1ee 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt
@@ -86,7 +86,7 @@ please choose against which one you would like to authenticate:
Don't have a password yet?
If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.
-
Don't have a library card?
If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration %] or register here[% END %].
+
Don't have a library card?
If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %] or register here[% END %].