From 18cfaa08d77c34b2f92aaf829cd5fd7bc6e47674 Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Tue, 15 Jan 2013 07:52:02 -0500
Subject: [PATCH] Bug 9384 - With OPACPatronDetails set to 'don't allow' a
 form shows

Because of the new feature to allow patrons to register for a card
via the opac when you have OPACPatronDetails  set to 'don't allow'
it still shows a from for the patron details, but you can't edit the form.
It would be better if this showed as a text display like it used to so
that it's not confusing to patrons ( even with the note about seeing
the librarian ).

Test Plan:
1) Apply patch
2) Log into OPAC
3) Set OPACPatronDetails to "Allow"
4) Refresh the page and click "my personal details"
5) Verify you get the editable form ( opac-memberentry.pl )
6) Set OPACPatronDetails to "Don't allow"
7) Refresh the page and click "my personal details" again
8) Verify you get the non-editable non-form details page ( opac-userupdate.pl )

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Passes tests, works as advertised
---
 koha-tmpl/opac-tmpl/ccsr/en/includes/usermenu.inc |    9 ++++++++-
 koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc |    9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/ccsr/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/ccsr/en/includes/usermenu.inc
index 99e8743..6cacb1a 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/includes/usermenu.inc
+++ b/koha-tmpl/opac-tmpl/ccsr/en/includes/usermenu.inc
@@ -5,7 +5,14 @@
   [% IF ( OPACFinesTab ) %]
   [% IF ( accountview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-account.pl">my fines</a></li>
   [% END %]
-  [% IF ( userupdateview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a></li>
+  [% IF ( userupdateview ) %]
+      <li class="active">[% ELSE %]<li>[% END %]
+      [% IF OPACPatronDetails %]
+          <a href="/cgi-bin/koha/opac-memberentry.pl">my personal details</a>
+      [% ELSE %]
+          <a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a>
+      [% END %]
+      </li>
   [% IF ( TagsEnabled ) %]
     [% IF ( tagsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-tags.pl?mine=1">my tags</a></li>
   [% END %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc
index 5a07d95..51a72ba 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc
@@ -5,7 +5,14 @@
   [% IF ( OPACFinesTab ) %]
   [% IF ( accountview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-account.pl">my fines</a></li>
   [% END %]
-  [% IF ( userupdateview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-memberentry.pl">my personal details</a></li>
+  [% IF ( userupdateview ) %]
+      <li class="active">[% ELSE %]<li>[% END %]
+      [% IF OPACPatronDetails %]
+          <a href="/cgi-bin/koha/opac-memberentry.pl">my personal details</a>
+      [% ELSE %]
+          <a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a>
+      [% END %]
+      </li>
   [% IF ( TagsEnabled ) %]
     [% IF ( tagsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-tags.pl?mine=1">my tags</a></li>
   [% END %]
-- 
1.7.9.5