From 14637559b4c5f83ef10256c9fa50925ccb573b39 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Tue, 17 Mar 2020 20:43:59 +0000 Subject: [PATCH] Bug 23808: (follow-up) Display card number in 'Guarantor information' in memberentry.pl Instead of displaying 'Patron #' and displaying the guarantor's borrowernumber in 'Guarantor information' we should display 'Patron card number:' with the cardnumber displayed as that value is more meaningful to librarians. The hyperlink containing the borrowernumber should stay the same so that librarians can easily visit the patron record of existing guarantor patrons. Test plan: 1. Apply first patch and follow it's test plan 2. On an Adult patrons record select 'Add guarantee' 3. In 'Guarantor information' section of memberentry.pl observe in the pre-filled guarantor information there is a line 'Patron #:' with a link displaying a borrowernumber (not card number) and when you click on the link it takes you to the adult/guarantors patron account 4. Select 'Search to add' and search and add another guarantor 5. Observe in the added guarantor 'Patron #:' is displayed along with the borrowernumber (not card number). The borrowernumber displayed in not a link. 6. Apply this patch 7. On a adults patron select 'Add guarantee' 8. Observe in 'Guarantor information' section the pre-filled guarantor now has 'Patron card number:' displayed (instead of 'Patron #:', and it's link now displays the guarantors cardnumber. Clicking on the link still takes you to the guarantors patron account 9. Repeat step 4 10. Observe in the added guarantor they also have 'Patron card number:' (instead of 'Patron #:'). A cardnumber rather than borrowernumber is displayed. The cardnumber is not a link. 11. Confirm tests still pass: sudo koha-shell prove xt prove t Sponsored-by: South Taranaki District Council, NZ Signed-off-by: Andreas Roussos Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- .../prog/en/modules/members/memberentrygen.tt | 10 +++++----- koha-tmpl/intranet-tmpl/prog/js/members.js | 2 +- 2 files changed, 6 insertions(+), 6 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 80328ed69d..2893ed9252 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -416,8 +416,8 @@ legend:hover { [% ELSE %]
  • - Patron #: - [% r.guarantor_id | html %] + Patron card number: + [% r.guarantor.cardnumber | html %]
  • [% IF r.guarantor.surname %] @@ -451,8 +451,8 @@ legend:hover {
    1. - Patron #: - [% guarantor.borrowernumber | html %] + Patron card number: + [% guarantor.cardnumber | html %]
    2. @@ -487,7 +487,7 @@ legend:hover {
      1. - Patron #: + Patron card number:
      2. diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js index da7d47e26d..1e102f1be7 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/members.js +++ b/koha-tmpl/intranet-tmpl/prog/js/members.js @@ -181,7 +181,7 @@ function select_user(borrowernumber, borrower, relationship) { var guarantor_id = $('#guarantor_id').val(); if ( guarantor_id ) { fieldset.find('.new_guarantor_id').first().val( guarantor_id ); - fieldset.find('.new_guarantor_id_text').first().text( guarantor_id ); + fieldset.find('.new_guarantor_id_text').first().text( borrower.cardnumber ); } else { fieldset.find('.guarantor_id').first().hide(); } -- 2.39.5