From 8c361c4215dbbaba5e0e93352eccca7fb4e14642 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Jun 2020 18:51:15 +0000 Subject: [PATCH] Bug 25879: Improve display of guarantor information in the patron entry form This patch makes some changes to the patron entry template to improve the display of guarantor information. To test, apply the patch and locate a patron with a "Child" type category. - Edit the patron's record - Under "Guarantor information," click the "Search to add" button. - Search for and select a patron. - The guarantor information should be added to the patron edit form. The information should be correct and well formatted. - Click the "Remove" link. The guarantor information should be removed. - Search for an select a guarantor again and save the record. - Edit the patron record again. The saved guarantor information should look correct. --- .../prog/en/modules/members/memberentrygen.tt | 70 ++++++---------------- koha-tmpl/intranet-tmpl/prog/js/members.js | 1 + 2 files changed, 20 insertions(+), 51 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 9ff3b1a8e7..14f0d2dae8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -407,45 +407,30 @@ legend:hover { [% IF show_guarantor || guarantor %] [% SET possible_relationships = Koha.Preference('borrowerRelationship') %] - +
Guarantor information - +
[% FOREACH r IN relationships %] -
+
    [% IF category_type == 'I' %]
  1. - Organization #: [% IF ( r.guarantor_id ) %] [% r.guarantor_id | html %][% END %] + Organization: + [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
  2. -
  3. - - [% r.guarantor.surname | html %] + Relationship: + [% r.relationship | html %]
  4. [% ELSE %]
  5. - Patron card number: - [% r.guarantor.cardnumber | html %] + Guarantor: + [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %]
  6. - - [% IF r.guarantor.surname %] -
  7. - - [% r.guarantor.surname | html %] -
  8. - [% END %] - - [% IF r.guarantor.firstname %] -
  9. - - [% r.guarantor.firstname | html %] -
  10. - [% END %] -
  11. - + Relationship: [% r.relationship | html %]
  12. @@ -467,16 +452,6 @@ legend:hover {
  13. - - [% guarantor.surname | html %] -
  14. - -
  15. - - [% guarantor.firstname | html %] -
  16. - -
  17. [% UNLESS empty_relationship_allowed %]
  18. - - -
  19. - -
  20. - - -
  21. - -
  22. [% UNLESS empty_relationship_allowed %]