[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
Wed Sep 27 11:29:46 CEST 2023


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

Emmi Takkinen <emmi.takkinen at koha-suomi.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #155643|0                           |1
        is obsolete|                            |

--- Comment #6 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 156263
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156263&action=edit
Bug 34671: Show error message if fieldset has invalid input

If fieldset is collapsed and it contains required fields
patron can be saved without filling these fields. This patch adds
rule ignore as "" in form validation and displayes error message
in fieldsets containing missing required inputs.

To test:
1. Make sure you have "Main address" fields set as mandatory
with BorrowerMandatoryField syspref (address, city, zipcode)
2. Add new patron, fill in some info, but leave "Main address"
fields empty.
3. Attempt to save.
=> "This field is mandatory" should be displayed next to the
address fields.
4. Collapse "Main address" fieldset.
5. Attempt to save again.
=> Patron is saved successfully without address information.
6. Apply this patch.
7. Edit patron and attempt to save again with "Main address"
fieldset collapsed.
=> Error message "There are some required fields missing from this field set.
Please fill them." should be displayed
and patron isn't saved.
8. Fill missing fields, attempt to 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