Bugzilla – Attachment 119013 Details for
Bug 25946
borrowerRelationship can no longer be empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25946: borrowerRelationship can be empty
Bug-25946-borrowerRelationship-can-be-empty.patch (text/plain), 10.09 KB, created by
Martin Renvoize (ashimema)
on 2021-03-30 14:18:14 UTC
(
hide
)
Description:
Bug 25946: borrowerRelationship can be empty
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-30 14:18:14 UTC
Size:
10.09 KB
patch
obsolete
>From a790ad246e3e0ebb116e8ab382d0c628ba0aefa1 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Tue, 30 Mar 2021 14:42:11 +0300 >Subject: [PATCH] Bug 25946: borrowerRelationship can be empty > >Do not show the empty dropdown with no options if borrowerRelationship >is disabled (empty) in the syspref. > >To reproduce: > 1) Go to system preferences and disable borrowerRelationship. > 2) Create a new patron or modify the existing one. > 3) Under "Guarantor Information" click on "Search to add" button. > After performing the search, select different patron to act as > guarantor. > 4) Observe that there's empty dropdown for the relation type. > 5) Apply the patch. > 6) Repeat steps above. > 7) Observe that dropdown is no longer there. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/members/memberentrygen.tt | 76 ++++++++++--------- > 1 file changed, 42 insertions(+), 34 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 e63e97e347..643d4b9a46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -457,25 +457,29 @@ legend:hover { > <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/> > </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"> >- [% ELSE %] >- <label for="guarantor_relationship">Relationship: </label> >- <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >- [% END %] >- <option value="" selected>Empty option</option> >- [% FOREACH pr IN possible_relationships.split('\|') %] >- [% IF pr != "" %] >- <option value="[% pr | html %]">[% pr | html %]</option> >+ [% IF possible_relationships %] >+ <li> >+ [% UNLESS empty_relationship_allowed %] >+ <label for="guarantor_relationship" class="required">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >+ [% ELSE %] >+ <label for="guarantor_relationship">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >+ [% END %] >+ <option value="" selected>Empty option</option> >+ [% FOREACH pr IN possible_relationships.split('\|') %] >+ [% IF pr != "" %] >+ <option value="[% pr | html %]">[% pr | html %]</option> >+ [% END %] > [% END %] >+ </select> >+ [% UNLESS empty_relationship_allowed %] >+ <span class="required">Required</span> > [% END %] >- </select> >- [% UNLESS empty_relationship_allowed %] >- <span class="required">Required</span> >- [% END %] >- </li> >+ </li> >+ [% ELSE %] >+ <input type="hidden" name="new_guarantor_relationship" value="" /> >+ [% END %] > > <li> > <label for="guarantor_cancel"> </label> >@@ -497,25 +501,29 @@ legend:hover { > <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/> > </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"> >- [% ELSE %] >- <label for="guarantor_relationship">Relationship: </label> >- <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >- [% END %] >- <option value="" selected></option> >- [% FOREACH pr IN possible_relationships.split('\|') %] >- [% IF pr != "" %] >- <option value="[% pr | html %]">[% pr | html %]</option> >+ [% IF possible_relationships %] >+ <li> >+ [% UNLESS empty_relationship_allowed %] >+ <label for="guarantor_relationship" class="required">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >+ [% ELSE %] >+ <label for="guarantor_relationship">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >+ [% END %] >+ <option value="" selected></option> >+ [% FOREACH pr IN possible_relationships.split('\|') %] >+ [% IF pr != "" %] >+ <option value="[% pr | html %]">[% pr | html %]</option> >+ [% END %] > [% END %] >+ </select> >+ [% UNLESS empty_relationship_allowed %] >+ <span class="required">Required</span> > [% END %] >- </select> >- [% UNLESS empty_relationship_allowed %] >- <span class="required">Required</span> >- [% END %] >- </li> >+ </li> >+ [% ELSE %] >+ <input type="hidden" name="new_guarantor_relationship" value="" /> >+ [% END %] > > <li> > <label for="guarantor_cancel"> </label> >-- >2.20.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 25946
:
107469
|
108048
|
118991
|
118992
|
118993
|
118997
|
118998
|
118999
|
119011
|
119012
| 119013 |
119015