[Koha-bugs] [Bug 34671] Collapsing fields in patron form allows saving without mandatory fields

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 25 10:56:07 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34671

--- Comment #4 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 156145
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156145&action=edit
Bug 34671: Ignore new_guarantor_relationship input if it's hidden

Validating patron forms hidden fields causes problems when
adding/modifying guarantee patrons since class
new_guarantor_relationship is always hidden and mandatory
if syspref "borrowerRelationship" is set. This patch adds class
ignore_validation to relationship input if it's hidden to ignore
validatation and removes it when input is displayed, so it is
validated.

To test:
1. Apply previous patch.
2. Add or modify guarantee patron.
3. Do not add or modify guarantor.
4. Attempt to save patron.
=> Pressing save button does nothing and no error is
displayed.
5. Apply this patch.
6. Again add or modify guarantee patron and don't add or
modify guarantor.
7. Attempt to save.
=> Saving should now be successfull.
8. Again, add or modify guarantee patron, but this time also
add or modify guarantor.
9. Leave relationship input empty.
10. Attempt to save.
=> Saving should fail and error "There are some required
fields missing..." should be displayed on top of "Patron
guarantor" field set.
11. Add relationship for guarantor and save.
=> Saving should now be successfull.

Sponsored-by: Koha-Suomi Oy

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list