ab1fd8a556
This patch adds server-side & client-side validation for email form fields in the members/memberentry -view and in the opac/memberentry-view (bootstrap). I recently added simple validation for phone number and email address fields for our in-house koha and saw this old bug: I'm open to any ideas on how to do this better. Validation for phone numbers would be easy to add on top of this but I left it out since this bug is only about the email fields. To test: 1) Select a member and go to any of the edit forms with email fields (Primary info, "Library use", "Alternate address", "Alternative contact"). 2) Disable javascript in the browser in order to test server-side validation and try to input invalid emails in each of the email form fields. 3) Confirm that an invalid address is catched from any of the email fields, an alert shown for each invalid address and that the member's information was not updated with invalid data. 4) Enable javascript in the browser. 5) Confirm that the jquery validation plugin caches invalid addresses from any of the email fields and that you cannot send the form before correcting the problem. 6) Perform the same tests for the opac-memberentry-view. Note: as the jQuery validation plugin doesn't exist in the bootstrap folder, I just copied it over from the staff-client folder -how to deal with this? Signed-off-by: Owen Leonard <oleonard@myacpl.org> I have undone the changes to opac.css so that they can be submitted as a separate patch. I have some other follow-ups to make as well. Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
bootstrap | ||
lib |