http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6209
--- Comment #3 from Owen Leonard <[email protected]> --- Created attachment 8474 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8474&action=edit Bug 6209 - Standardize on one plugin for client-side form validation This patch adds the jQuery "Validation" plugin (http://docs.jquery.com/Plugins/Validation) and includes it by default in the staff client, adding one default configuration: A translatable string to be used for a default "required" message. For a simple example I have modified the library entry form to mark required fields as required (something which had not been done before). Each required field has been given a class, "required" and the HTML5 attribute "required." The former adds the hook for the plugin, the latter adds browser-based validation in recent browsers (and which will be superceded by the plugin if JavaScript is enabled). In the template the form which should be validated is initialized like so: $("#FormID").validate(); This will check for inputs classed "required" without any additional configuration. More complex forms (with specific data types, for instance) will require more inline JavaScript configuration. To test, go to Administration -> Libraries and Groups and choose "New library." Submit the form without entering a library code or name. You should be prevented from submitting the form and be shown an error message by each field. To test browser-based validation, disable JavaScript and follow the same procedure. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
