js email validation improvment (onBlur)
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 9 Jan 2011 18:36:05 +0000 (18:36 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 9 Jan 2011 18:36:05 +0000 (18:36 +0000)
commit3e52b0bac32bb84ffc1bb30a400d9b13e63f7bdd
tree55307eace0ef9f88dfa0ce508cc362144185c735
parentc16556dd84c84ddcd3356921d0e37e6c77ec22b5
js email validation improvment (onBlur)

commit log more or less follow the diff order:
* adds an id to the UserPreferences form (#mw-prefs-form)
* Add an handler on the form submission to validate the email. This also
  update the label and, when email is invalid, get focus on the field.
* use onBlur javascript event instead of onKeyUp (per r75670 CR)
* Label update is now a function ... (wfUpdateMailValidityLabel)
* ... let us update the label on form submission
* Clear the label message when email is empty (null)
* Made the js regexp to stop capturing
* Fix js email validation function to return a boolean
  (it still return 'null' when given an empty email address)
includes/Preferences.php
resources/mediawiki.special/mediawiki.special.preferences.js