Bugzilla – Attachment 105420 Details for
Bug 25322
Adding a guarantor with no relationship defaults to first available relationship name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25322: fix for don't default "relationship" dropdown to father
Bug-25322-fix-for-dont-default-relationship-dropdo.patch (text/plain), 4.53 KB, created by
ByWater Sandboxes
on 2020-05-28 15:34:37 UTC
(
hide
)
Description:
Bug 25322: fix for don't default "relationship" dropdown to father
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-05-28 15:34:37 UTC
Size:
4.53 KB
patch
obsolete
>From ad4eeb7684b0464e2e61041be3f7d179e0b759c1 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Thu, 28 May 2020 18:20:11 +0300 >Subject: [PATCH] Bug 25322: fix for don't default "relationship" dropdown to > father > >When you create a patron's guarantor on cgi-bin/koha/members/memberentry.pl but don't select the relationship from a dropdown, the relationship defaults to first default value, which in this case is father that may or may not be correct as that is not a conscious choice from the user. >The solution is to make the "Relationship" field mandatory, starting with an empty option but not allowing the user to save empty, so choice will be conscious. > >To reproduce: > 1) Create a new patron who is assumed to have a guarantor or modify the existing one. > 2) Under "Guarantor Information" click on "Search to add" button. After performing the search, select a user to act as guarantor. Don't use the dropdown menu to select a relationship. Save your changes. > 3) Observe that relationship is set as "father". > 4) Apply the patch. > 5) Repeat steps 1 and 2. > 6) Observe that it doesn't allow you to save the form until you pick a relationship type. > >Mentored-by: Andrew Nugged <nugged@gmail.com> > >Signed-off-by: Holly Cooper <hc@interleaf.ie> >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 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 8cc1c9ec00..16d7220240 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -474,12 +474,14 @@ legend:hover { > </li> > > <li> >- <label for="guarantor_relationship">Relationship: </label> >- <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >+ <label for="guarantor_relationship" class="required">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >+ <option value="" selected></option> > [% FOREACH pr IN possible_relationships.split('\|') %] > <option value="[% pr | html %]">[% pr | html %]</option> > [% END %] > </select> >+ <span class="required">Required</span> > </li> > > <li> >@@ -510,12 +512,14 @@ legend:hover { > </li> > > <li> >- <label for="guarantor_relationship">Relationship: </label> >- <select class="new_guarantor_relationship" name="new_guarantor_relationship"> >+ <label for="guarantor_relationship" class="required">Relationship: </label> >+ <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required"> >+ <option value="" selected></option> > [% FOREACH pr IN possible_relationships.split('\|') %] > <option value="[% pr | html %]">[% pr | html %]</option> > [% END %] > </select> >+ <span class="required">Required</span> > </li> > > <li> >-- >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 25322
:
105419
|
105420
|
105677
|
105972
|
106170
|
106318