Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Owen Leonard c28f7d7de5 Bug 6209 [Revised] 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 along with an include file containing
translatable strings for all of the plugin's possible messages.

The staff client's main JavaScript file has been modified to perform
automatic validation of any form with the class "validated."

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).

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.

$("#FormID").validate({ /* configuration details */ });

Also added to the library entry form are checks on the email and URL
fields via classes ("email" and "url", respectively). This demonstrates
validation of content without forcing the field to be required.

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. Perform the same check with an
existing entry.

To test browser-based validation, disable JavaScript and follow
the same procedure.

Revision rebases the patch against current master and adds missing
"//<![CDATA["

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described with new or existing library.
No errors.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-23 00:12:36 -04:00
..
acqui Bug 5343: Fix non english string 2013-03-22 23:54:46 -04:00
admin Bug 6209 [Revised] Standardize on one plugin for client-side form validation 2013-03-23 00:12:36 -04:00
authorities Bug 9676 - Replace YUI buttons on authorities editor page with Bootstrap 2013-03-07 10:20:38 -05:00
basket Bug 9669 - Replace YUI buttons on staff client cart toolbar 2013-02-28 19:14:46 -05:00
batch
catalogue Bug 7440 - Remove NoZebra vestiges 2013-03-19 21:17:04 -04:00
cataloguing Bug 9450 [Revised] Use DataTables in cataloging Z39.50 search results 2013-03-07 10:38:01 -05:00
circ Bug 9604 - Follow-up: Changing labels from branch to library 2013-03-22 22:05:38 -04:00
errors
help Bug 7440 follow-up removing forgotten NoZebra references 2013-03-19 21:17:05 -04:00
installer
labels Bug 9635 - Replace YUI buttons on label batches pages with Bootstrap 2013-02-18 08:55:55 -05:00
members Bug 9457: [ENH] Ordering branches should be case independent (2) 2013-03-20 15:35:58 -04:00
offline_circ Bug 8220 - Allow koc uploads to go to process queue instead of being applied directly. 2013-03-21 20:35:37 -04:00
patroncards Bug 9695 - Use alphabet system preference on page used to browse patrons for patron card batches 2013-03-13 08:43:25 -04:00
plugins Bug 7804 - Add Koha Plugin System - QA Followup 2 2013-03-20 14:50:19 -04:00
reports Bug 9117 [Follow-up] Translatable string should be in double quotes 2013-03-21 18:54:10 -04:00
reserve Bug 9457: [ENH] Ordering branches should be case independent (2) 2013-03-20 15:35:58 -04:00
reviews
rotating_collections
serials Bug 5343: Fix non english string 2013-03-22 23:54:47 -04:00
services
sms
suggestion Bug 9879 - Use DataTables on suggestions management page 2013-03-21 18:30:09 -04:00
tags Bug 9473: Use DataTables on tags list page 2013-02-07 07:48:05 -05:00
test
tools Bug 7241, follow-up: viewlog link for circulation 2013-03-21 11:43:53 -04:00
virtualshelves Bug 9458 - Add sorting to lists - QA Followup 4 2013-03-13 09:06:20 -04:00
z3950 Bug 9265 - Switch to HTML5 doctype in OPAC and staff client 2013-01-31 11:47:04 -05:00
about.tt Bug 7440 - Remove NoZebra vestiges 2013-03-19 21:17:04 -04:00
auth.tt
intranet-main.tt Bug 7875: Change the pending suggestion link in home page so that it directs to pending suggestions 2013-03-20 08:40:43 -04:00