From a00d69d52f288663c35617d90f761b979e755aa8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 1 Dec 2015 12:09:35 +0000 Subject: [PATCH] Bug 15163: Do not erase patron attributes if limited to another library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patron attributes displayed on editing a patron are not displayed if limited to another library. This is the easy but dirty way to fix this issue: It supposes that the data are not sensitive as they are now displayed in the html document. A better way to fix it would be to modify C4::Members::Attributes::SetBorrowerAttributes to delete only attributes we are editing. Test plan: 1/ Create 2 patron attributes, without branch limitations. 2/ Edit a patron and set a value for these attributes 3/ Limit a patron attributes to a library (one you are not logged in with). 4/ Edit again the patron. => You should not see the limited attributes 5/ Edit the patron attributes and remove the branch limitation => Without this patch, it has been removed from the database and is not displayed anymore. => With this patch, you should see it. Followed test plan, works as described. Signed-off-by: Marc VĂ©ron http://bugs.koha-community.org/show_bug.cgi?id=15165 --- .../prog/en/modules/members/memberentrygen.tt | 14 +++++++++++--- members/memberentry.pl | 8 +++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index a3b7a9d..0dd9c2e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1004,8 +1004,15 @@ [% END %]
    [% FOREACH patron_attribute IN pa_loo.items %] -
  1. - + [% IF patron_attribute.limited_to_another_branch %] + + + [% IF patron_attribute.password_allowed %] + + [% END %] + [% ELSE %] +
  2. + [% IF ( patron_attribute.use_dropdown ) %]