Bugzilla – Attachment 106669 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.22 KB, created by
Caroline Cyr La Rose
on 2020-07-08 21:13:09 UTC
(
hide
)
Description:
Bug 25879: Improve display of guarantor information in the patron entry form
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2020-07-08 21:13:09 UTC
Size:
12.22 KB
patch
obsolete
>From daaca61c8e8d00ec1c261780d33ab5de784390aa 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> >--- > .../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') %] >- <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> > >@@ -466,16 +451,6 @@ legend:hover { > <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/> > </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> >@@ -503,26 +478,19 @@ 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> >@@ -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.17.1
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