Bugzilla – Attachment 77276 Details for
Bug 21121
New syspref to allow hiding of private patron data in circulation page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21121 - Added new system preference to control hiding of personal patron information in the circulation page
Bug-21121---Added-new-system-preference-to-control.patch (text/plain), 7.35 KB, created by
Alex Buckley
on 2018-07-26 02:19:03 UTC
(
hide
)
Description:
Bug 21121 - Added new system preference to control hiding of personal patron information in the circulation page
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-07-26 02:19:03 UTC
Size:
7.35 KB
patch
obsolete
>From 4df0b2becf5b290339204ab3a71bd40672d7b635 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 23 Jul 2018 04:34:06 +0000 >Subject: [PATCH] Bug 21121 - Added new system preference to control hiding of > personal patron information in the circulation page > >Libraries may want to hide personal patron data from the circulation >page for privacy reasons this syspref introduces that ability for >library staff to control the display of this data themselves without >having to ask support vendors to hide it for them. > >Test plan: >1. View circulation page and input a patrons barcode or name >2. Notice if the patron has a phone number, email, street address and >city set then these are displayed in the left hand side of the screen >under the patrons name. Otherwise if all/any of these fields are not set >for the patron then the text: "No <datafield> stored." is displayed. >3. Apply this patch >4. Run ./updatedatabase.pl from the Koha shell to run the atomicupdate >5. Restart memcached and plack >6. Notice a new systempreference named >'HidePersonalPatronDetailOnCirculation' has been added, which has the >default value 'Dont' >7. Without changing the default value notice the personal patron >information is still displayed on the circulation page >8. Change the value of the syspref to 'Do' and now notice the phone >number, email address, street address and city are now hidden in the >circulation page > >Sponsored-By: Catalyst IT >--- > ...de_personal_patron_data_on_circulation_page.sql | 1 + > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 68 +++++++++++----------- > .../en/modules/admin/preferences/circulation.pref | 6 ++ > 3 files changed, 42 insertions(+), 33 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_21121_new_syspref_hide_personal_patron_data_on_circulation_page.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_21121_new_syspref_hide_personal_patron_data_on_circulation_page.sql b/installer/data/mysql/atomicupdate/bug_21121_new_syspref_hide_personal_patron_data_on_circulation_page.sql >new file mode 100644 >index 0000000..2f7fc39 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21121_new_syspref_hide_personal_patron_data_on_circulation_page.sql >@@ -0,0 +1 @@ >+INSERT INTO systempreferences (variable, value, options, explanation) VALUES ('HidePersonalPatronDetailOnCirculation', 0, 'YesNo', 'Hide patrons phone number, email address, street address and city in the circulation page'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index dcdf1cc..3beb8a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -16,44 +16,46 @@ > <div></div> > </li> > [% END %] >- [% END %] >- [% IF Koha.Preference( 'AddressFormat' ) %] >- [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] >- [% ELSE %] >- [% INCLUDE 'member-display-address-style-us.inc' %] >- [% END %] >+ [% END %] >+ [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %] >+ [% IF Koha.Preference( 'AddressFormat' ) %] >+ [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] >+ [% ELSE %] >+ [% INCLUDE 'member-display-address-style-us.inc' %] >+ [% END %] > >- [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone"> >- [% IF ( patron.phone ) %] >- <a href="tel:[% patron.phone | url %]">[% patron.phone | html %]</a> >- [% ELSE %] >- [% IF ( patron.mobile ) %] >- <a href="tel:[% patron.mobile | url %]">[% patron.mobile | html %]</a> >+ [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone"> >+ [% IF ( patron.phone ) %] >+ <a href="tel:[% patron.phone | url %]">[% patron.phone | html %]</a> > [% ELSE %] >- [% IF ( patron.phonepro ) %] >- <a href="tel:[% patron.phonepro | url %]">[% patron.phonepro | html %]</a> >+ [% IF ( patron.mobile ) %] >+ <a href="tel:[% patron.mobile | url %]">[% patron.mobile | html %]</a> >+ [% ELSE %] >+ [% IF ( patron.phonepro ) %] >+ <a href="tel:[% patron.phonepro | url %]">[% patron.phonepro | html %]</a> >+ [% END %] >+ [% END %] >+ [% END %]</li>[% END %] >+ [% IF ( patron.email ) %] >+ <li class="email"> <a href="mailto:[% patron.email | url %]" title="[% patron.email | html %]">[% patron.email | html %]</a></li> >+ [% ELSE %] >+ [% IF ( patron.emailpro ) %] >+ <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li> > [% END %] > [% END %] >- [% END %]</li>[% END %] >- [% IF ( patron.email ) %] >- <li class="email"> <a href="mailto:[% patron.email | url %]" title="[% patron.email | html %]">[% patron.email | html %]</a></li> >- [% ELSE %] >- [% IF ( patron.emailpro ) %] >- <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li> >- [% END %] >- [% END %] > >- [% UNLESS ( patron.address or patron.address2 ) %] >- <li><span class="empty" id="noaddressstored">No address stored.</span></li> >- [% END %] >- [% UNLESS ( patron.city ) %] >- <li><span class="empty" id="nocitystored">No city stored.</span></li> >- [% END %] >- [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %] >- <li> <span class="empty">No phone stored.</span></li> >- [% END %] >- [% UNLESS ( patron.email or patron.emailpro) %] >- <li> <span class="empty">No email stored.</span></li> >+ [% UNLESS ( patron.address or patron.address2 ) %] >+ <li><span class="empty" id="noaddressstored">No address stored.</span></li> >+ [% END %] >+ [% UNLESS ( patron.city ) %] >+ <li><span class="empty" id="nocitystored">No city stored.</span></li> >+ [% END %] >+ [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %] >+ <li> <span class="empty">No phone stored.</span></li> >+ [% END %] >+ [% UNLESS ( patron.email or patron.emailpro) %] >+ <li> <span class="empty">No email stored.</span></li> >+ [% END %] > [% END %] > > [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 8c66afe..217f48d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -509,6 +509,12 @@ Circulation: > yes: Cumulate > no: "Don't cumulate" > - the restriction periods. >+ - >+ - pref: HidePersonalPatronDetailOnCirculation >+ choices: >+ yes: Do >+ no: "Don't" >+ - Hide patrons phone number, email address, street address and city in the circulation page > Holds Policy: > - > - pref: AllowHoldItemTypeSelection >-- >2.1.4
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 21121
:
77276
|
77280
|
77367
|
77368