From 0f7a85023e9e640372cebbcc3e776e99e8b6c129 Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Fri, 16 Sep 2016 17:58:53 +0300 Subject: [PATCH] Bug 17307 - Some edit buttons/links for patrons do not work without a categorycode in the URL In the Staff client, the 'Edit' button in the patron search page doesn't work. This is also true for one of the 'Edit' links in the patron Detail page, and the 'Edit' link in the Norwegian national patron database search page. This reason behind this is a missing categorycode parameter in the URL, and this patch fixes that. Test plan: 0) [PREREQUISITES FOR STEP 3] Enable the Norwegian national patron database search by setting the following sysprefs: NorwegianPatronDBEnable -> Enable NorwegianPatronDBEndpoint -> test NorwegianPatronDBSearchNLAfterLocalHit -> Don't NorwegianPatronDBUsername -> username NorwegianPatronDBPassword -> password 1) Go to Home > Patrons, search for a patron, click on the 'Edit' button (last column). You cannot edit the patron, and you get the following Software error in your browser: Can't call method "get_expiry_date" on an undefined value at [...] 2) Go to the patron's Detail page and click on the 'Edit' link under the 'Library use' heading on the right. You'll get the same error. 3) Manually navigate to /cgi-bin/koha/members/nl-search.pl, then search for the card number of one of your patrons. Click 'Edit' under the 'Existing patrons' heading. You'll get the same error. 4) Apply the patch. 5) Repeat steps 1), 2), and 3). This time the 'Edit' button/links work. --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/tables/members_results.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 879f094..1b1f980 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -431,7 +431,7 @@ function validate1(date) { - + [% UNLESS ( I ) %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt index ae06764..e64dae1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt @@ -34,7 +34,7 @@ [% FOREACH patron IN local_result %]
  • [% patron.firstname %] [% patron.surname %] [% patron.cardnumber %] | Details | - Edit | + Edit | Check out
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index afef708..397e61c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -32,7 +32,7 @@ "dt_borrowernotes": "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", "dt_action": - " Edit", + " Edit", "borrowernumber": "[% data.borrowernumber %]" }[% UNLESS loop.last %],[% END %] -- 2.1.4