Bugzilla – Attachment 108012 Details for
Bug 25879
Improve display of guarantor information in the patron entry form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25879: Improve display of guarantor information in the patron entry form
Bug-25879-Improve-display-of-guarantor-information.patch (text/plain), 12.43 KB, created by
Nick Clemens (kidclamp)
on 2020-08-10 18:41:23 UTC
(
hide
)
Description:
Bug 25879: Improve display of guarantor information in the patron entry form
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-08-10 18:41:23 UTC
Size:
12.43 KB
patch
obsolete
>From 0dbd8435b2008b4923b8f62832e5c7b7bd296650 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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. > >Looks great! > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../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 0014a0f612..e0e8902c52 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') %] >- <span id="memberentry_guarantor_anchor"> >+ <div id="memberentry_guarantor_anchor"> > <fieldset id="memberentry_guarantor" class="rows"> > <legend>Guarantor information</legend> > >- <span id="guarantor_relationships"> >+ <div id="guarantor_relationships"> > [% FOREACH r IN relationships %] >- <fieldset class="rows"> >+ <fieldset> > <ol> > [% IF category_type == 'I' %] > <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]"> >- <span class="label">Organization #:</span> [% IF ( r.guarantor_id ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>[% END %] >+ <span class="label">Organization:</span> >+ [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %] > </li> >- > <li> >- <label for="guarantor_surname">Organization name: </label> >- <span>[% r.guarantor.surname | html %]</span> >+ <span class="label">Relationship:</span> >+ <span>[% r.relationship | html %]</span> > </li> > [% ELSE %] > <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]"> >- <span class="label">Patron card number:</span> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a> >+ <span class="label">Guarantor:</span> >+ [% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %] > </li> >- >- [% IF r.guarantor.surname %] >- <li> >- <label for="guarantor_surname">Surname: </label> >- <span>[% r.guarantor.surname | html %]</span> >- </li> >- [% END %] >- >- [% IF r.guarantor.firstname %] >- <li> >- <label for="guarantor_firstname">First name: </label> >- <span>[% r.guarantor.firstname | html %]</span> >- </li> >- [% END %] >- > <li> >- <label for="relationship">Relationship: </label> >+ <span class="label">Relationship:</span> > <span>[% r.relationship | html %]</span> > </li> > >@@ -467,16 +452,6 @@ legend:hover { > </li> > > <li> >- <label for="guarantor_surname">Surname: </label> >- <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span> >- </li> >- >- <li> >- <label for="guarantor_firstname">First name: </label> >- <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span> >- </li> >- >- <li> > [% UNLESS empty_relationship_allowed %] > <label for="guarantor_relationship" class="required">Relationship: </label> > <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >@@ -503,27 +478,20 @@ legend:hover { > </ol> > </fieldset> > [% END %] >- </span> <!-- #/guarantor_relationships --> >+ </div> <!-- #/guarantor_relationships --> > >- <fieldset class="rows guarantor" id="guarantor_template"> >+ <fieldset class="guarantor" id="guarantor_template"> > <ol> > <li class="guarantor-details" data-borrowernumber="0"> >- <span class="label">Patron card number:</span> >- <span class="new_guarantor_id_text"></span> >+ <span class="label">Guarantor:</span> >+ <a class="new_guarantor_link" href="#" target="blank"> >+ <span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span> >+ (<span class="new_guarantor_id_text"></span>) >+ </a> > <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/> > </li> > > <li> >- <label for="guarantor_surname">Surname: </label> >- <span class="new_guarantor_surname_text"></span> >- </li> >- >- <li> >- <label for="guarantor_firstname">First name: </label> >- <span class="new_guarantor_firstname_text"></span> >- </li> >- >- <li> > [% UNLESS empty_relationship_allowed %] > <label for="guarantor_relationship" class="required">Relationship: </label> > <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >@@ -545,7 +513,7 @@ legend:hover { > > <li> > <label for="guarantor_cancel"> </label> >- <span><a href="#" class="guarantor_cancel">Remove</a></span> >+ <span><a href="#" class="guarantor_cancel"><i class="fa fa-trash"></i> Remove</a></span> > </li> > </ol> > </fieldset> >@@ -591,7 +559,7 @@ legend:hover { > [% END %] > </ol> > </fieldset> <!-- /#memberentry_guarantor --> >- </span> <!-- #/memberentry_guarantor_anchor --> >+ </div> <!-- #/memberentry_guarantor_anchor --> > [% END # /IF show_guarantor || guarantor %] > > [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 1e102f1be7..4de6e6e198 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -182,6 +182,7 @@ function select_user(borrowernumber, borrower, relationship) { > if ( guarantor_id ) { > fieldset.find('.new_guarantor_id').first().val( guarantor_id ); > fieldset.find('.new_guarantor_id_text').first().text( borrower.cardnumber ); >+ fieldset.find('.new_guarantor_link').first().attr("href", "/cgi-bin/koha/members/moremember.pl?borrowernumber=" + guarantor_id ); > } else { > fieldset.find('.guarantor_id').first().hide(); > } >-- >2.11.0
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 25879
:
106311
|
106638
|
106669
|
107973
| 108012 |
108013