Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members
Petro Vashchuk 029f41a667 Bug 25322: fix for not selected "relationship" defaults to father
When a user creates a patron's guarantor on /cgi-bin/koha/members/memberentry.pl but doesn't select the relationship from a dropdown, the relationship defaults to first value, which in default sysprefs is "father". This may or may not be correct as this is not a conscious choice from the user.

The solution is to make the "Relationship" field mandatory when there is no empty entry in the system preferences, always starting with an empty option but not allowing the user to save an empty entry.
And if there is an empty option in sysprefs, it allows to save empty, as well as makes it default choice.

To reproduce with default system preferences:
    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.

To reproduce with empty entry added to system preferences:
    1) Add an empty entry to borrowerRelationship at /cgi-bin/koha/admin/preferences.pl?tab=patrons in Patron relationships section (example: "|father|mother").
    2) Create a new patron who is assumed to have a guarantor or modify the existing one.
    3) 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.
    4) Observe that relationship is set as "father".
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Observe when you save the empty entry it does set the relationship as empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:37:02 +02:00
..
tables Bug 14229: Remove extra spaces 2020-04-20 13:37:47 +01:00
accountline-details.tt
apikeys.tt
boraccount.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
deletemem.tt Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes 2020-06-15 11:53:36 +02:00
discharge.tt Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs 2020-04-20 12:28:05 +01:00
discharges.tt
files.tt
holdshistory.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
housebound.tt Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs 2020-04-20 12:28:05 +01:00
ill-requests.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
mancredit.tt
maninvoice.tt Bug 14898: Add button at manual invoice to redirect to pay tab 2020-02-20 09:04:27 +00:00
member-flags.tt
member-password.tt
member.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
memberentrygen.tt Bug 25322: fix for not selected "relationship" defaults to father 2020-06-29 12:37:02 +02:00
members-update.tt Bug 24476: Rename autorenewal to autorenew_checkouts 2020-03-24 11:23:54 +00:00
merge-patrons.tt
moremember-brief.tt Bug 25070: Centralize member-display-address-style 2020-06-15 11:53:36 +02:00
moremember-print.tt Bug 25070: Centralize member-display-address-style 2020-06-15 11:53:36 +02:00
moremember.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
notices.tt
pay.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
paycollect.tt Bug 25119: Fix account type and description for individual writeoffs/payments 2020-05-01 15:43:56 +01:00
printfeercpt.tt
printinvoice.tt
purchase-suggestions.tt Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs 2020-04-20 12:28:05 +01:00
readingrec.tt Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
routing-lists.tt
statistics.tt Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs 2020-04-20 12:28:05 +01:00
update-child.tt