aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-09-08 12:51:55 +0100
committerStruan Donald <struan@exo.org.uk>2011-09-08 12:51:55 +0100
commitee094a42b0ee8ba7a572652d26887a57b92f3310 (patch)
treecd110cb8d5fb0054c6e0a45b7f1455dccd51a4cd /web/js
parent06f486a3993e7cdaed3ffe45a352fa491e7ff62d (diff)
use dev validate plugin with patched so can use use required attribute and also not need to add filters to jquery
Diffstat (limited to 'web/js')
-rw-r--r--web/js/fixmystreet.js17
1 files changed, 0 insertions, 17 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 1dfdfd2bb..6064f886e 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -35,23 +35,6 @@ $(function(){
$('#email_alert_box').hide('fast');
}
- // add in handling for html5 form types...
- // should be removed if/when jQuery supports these by default
- // NB: required alteration of validation plugin code also
- jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
- var elem = e.target,
- type = elem.type;
-
- if ( ( type === "email" || type === "url" ) && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
- e.liveFired = undefined;
- return jQuery.fn.trigger( "submit", this, arguments );
- }
- });
-
- jQuery.expr.filters[ 'email' ] = function( elem ) {
- return "email" === elem.type;
- };
-
// FIXME - needs to use translated string
jQuery.validator.addMethod('validCategory', function(value, element) {
return this.optional(element) || value != '-- Pick a category --'; }, validation_strings['category'] );