Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added HTML5 forms validation script

  • Loading branch information...
commit 4c31719287866a68409d7e6635d0e9383d9bf131 1 parent 840c70b
@tyssen authored
Showing with 5 additions and 2 deletions.
  1. +1 −2  assets/css/master.css
  2. +4 −0 assets/js/jquery.html5form-1.5-min.js
View
3  assets/css/master.css
@@ -1,2 +1 @@
-
-@media screen{html{height:100%;overflow-y:scroll;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} body{background:#f5f445 url(http://griddle.it/960-12-20?color=FFE5E5&num=false) repeat-y center;color:#333333;font:normal 100% "Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",Verdana,"Verdana Ref",sans-serif;line-height:1.5;margin:0;} #wrap{font-size:81.25%;margin:0 auto;padding:0;width:960px;} #content{clear:both;overflow:hidden;} [role=main]{float:;width:;} [role=complementary]{float:;width:;} article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} audio[controls],canvas,video{display:inline-block;*display:inline;*zoom:1;} a{color:#0069d6;font-weight:bold;text-decoration:none;vertical-align:baseline;} a:link{-webkit-tap-highlight-color:#0050a3;} a:hover,a:focus,a:active{color:#0050a3;text-decoration:underline;} a:focus{outline:thin dotted;} a:active{outline:none;} a,button{-webkit-transition:color 0.5s linear;-o-transition:color 0.5s linear;-ms-transition:color 0.5s linear;-moz-transition:color 0.5s linear;transition:color 0.5s linear;} h1,h2,h3{color:#2d3435;} h1{font-size:2.25em;line-height:1.3333333333333333;margin:0.6666666666666666em 0 0;} h2{font-size:1.5em;line-height:1;margin:1em 0 0;} h3{font-size:1.125em;line-height:1.3333333333333333;margin:1.3333333333333333em 0 0;} h4{font-size:1em;line-height:1.5;margin:1.5em 0 0;} p{line-height:1.5;margin:0 0 1em;} p,li{-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;} ul,ol{margin:0 0 1em 1.5em;padding-left:1.5em;} li{margin-bottom:0.5em;} ul{list-style:disc;} ul ul{list-style:circle;} ol{list-style:decimal;} dt,dd{margin:0;padding:0;} figure img,figure object,figure embed,figure video{max-width:100%;display:block;} img{border:0;} .ie7 img{-ms-interpolation-mode:bicubic;} figure{position:relative;} abbr[title],dfn[title]{border-bottom:1px dotted #000;cursor:help;} .nav abbr[title]{border:0;} b,strong{font-weight:bold;} em{font-style:italic;} blockquote,q{quotes:none;} blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;} blockquote{margin:0;padding:0;} cite{display:block;text-align:right;} table{border-collapse:collapse;border-spacing:0;font-size:inherit;font:1em;} tr{vertical-align:top;} th,td{padding:2px;vertical-align:top;} ::selection,::-webkit-selection{background:#9d261d;color:#FFF;} ::-moz-selection{background:#9d261d;color:#FFF;} .hide{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden;} body:hover .hide a,body:hover .hide input,body:hover .hide button{display:none !important;} [role=navigation]{list-style:none;margin:0;padding:0;} [role=banner]{position:relative;} [role=banner] ul a{text-decoration:none;} [role=banner] ul a:hover,[role=banner] ul a:focus,[role=banner] ul a:active,[role=banner] ul .active{color:#0050a3;} .skip{margin:0;}.skip a{background-color:#9d261d;color:#FFF;font-size:.7692em;left:-9999em;top:0;line-height:1;position:absolute;padding:.3em 0;text-align:center;width:100%;}.skip a:focus,.skip a:active{left:0;} .logo{float:left;margin:;} .title{margin:0;} .slogan{margin:0;} .img-r{float:right;margin:.5em 0 1em 15px;} .img-l{float:left;margin:.5em 15px 1em 0;} img.centre{display:block;margin:1em auto;} .map{border:1px solid #bfbfbf;display:inline;float:right;height:300px;margin:0 0 1em 15px;width:300px;} .vcard{margin-bottom:2em;}.vcard h3{margin:0.5em 0 0;} .vcard p{margin:0;} .vcard em{font-style:normal;font-weight:bold;} form img{border:0;float:none;margin:0;padding:0;} form p{margin-top:1em;} fieldset{background-color:#FFF;border:2px solid #2d3435;margin-top:2em;padding:4em 10px 10px 0;position:relative;width:330px;} fieldset *{margin-left:10px;} legend{*margin-left:-7px;padding:0;}legend span{color:#2d3435;font-size:1.2308em;font-weight:bold;left:10px;letter-spacing:2px;margin:10px 0 1em 0;position:absolute;text-transform:uppercase;} .ie6 legend,.ie7 legend{margin-left:-7px;} label,button{cursor:pointer;} label{display:block;font-weight:bold;float:left;margin-bottom:.2em;width:7em;} button,input,select,textarea{font-size:1em;margin:0;vertical-align:baseline;*vertical-align:middle;} button,input{line-height:normal;*overflow:visible;} select,input,textarea,button{font-family:sans-serif;} input,textarea{font-size:14px;padding:2px 4px;} input,textarea,select{border:1px solid #bfbfbf;margin-bottom:.5em;width:300px;} textarea{overflow:auto;vertical-align:top;} input[type="radio"],input[type="checkbox"]{border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;margin:0 5px 0 0;padding:0;width:auto;} input[type="radio"]{vertical-align:text-bottom;} input[type="checkbox"]{vertical-align:bottom;*vertical-align:baseline;} input:hover,input:hover,textarea:hover,input:focus,input:focus,textarea:focus{background-color:#eaf1ff;} input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;} input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;} button{background-color:#ffffff;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(0.25, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, color-stop(0.25, #ffffff), #e6e6e6);background-image:-moz-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-ms-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-o-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);border:1px solid rgba(0, 0, 0, 0.1);border-bottom-color:rgba(0, 0, 0, 0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-o-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);color:#333333;display:-moz-inline-stack;display:inline-block;*display:inline !important;font-size:1.0769em;font-weight:bold;letter-spacing:1px;line-height:1;padding:0.4em 10px;position:relative;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);text-transform:uppercase;-moz-user-drag:-moz-none;-webkit-user-drag:none;user-drag:none;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;vertical-align:middle;behavior:url(/assets/js/PIE.htc);position:relative;left:6.5em;-webkit-appearance:button;}button:hover,button:focus,button:active{background-color:#ffffff;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(0.25, #f2f2f2), to(#cccccc));background-image:-webkit-linear-gradient(#ffffff, color-stop(0.25, #f2f2f2), #cccccc);background-image:-moz-linear-gradient(#ffffff, color-stop(#f2f2f2, 0.25), #cccccc);background-image:-ms-linear-gradient(#ffffff, color-stop(#f2f2f2, 0.25), #cccccc);background-image:-o-linear-gradient(#ffffff, color-stop(#f2f2f2, 0.25), #cccccc);background-image:linear-gradient(#ffffff, color-stop(#f2f2f2, 0.25), #cccccc);color:#333333;text-decoration:none;} button:active{bottom:-2px;left:7.51em;} button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} label.error{color:#C00;display:block;float:none;margin-left:7em;width:auto;} input.error,input.error,textarea.error{border-color:#cc0000;} input::-webkit-input-placeholder,input:-moz-placeholder{color:#bfbfbf;} [placeholder]{cursor:pointer;color:#bfbfbf;} [placeholder]:active,[placeholder]:focus{cursor:text;color:#808080;border:1px solid #0a0;-webkit-box-shadow:0 0 5px #00aa00;-o-box-shadow:0 0 5px #00aa00;-moz-box-shadow:0 0 5px #00aa00;box-shadow:0 0 5px #00aa00;} [role=contentinfo]{clear:both;margin-top:2em;padding-top:1em;position:relative;text-align:center;width:100%;}}@media print{@page {margin:0.5cm;}body{color:black;font-family:Verdana,sans-serif;font-size:10pt;width:600px;} #wrap{width:100% !important;} .nav,.skip,.aux-nav,.hide,form,[role=complementary],[role=contentinfo] a{display:none;} h1,h2,h3{font-family:"Trebuchet MS",Verdana,sans-serif;margin:15px 0 5px;} h2,h3{page-break-after:avoid;} p,h2,h3{orphans:3;widows:3;} a img{border:none;} a:link,a:visited{color:#999;text-decoration:none;} table{margin:1px;text-align:left;} th{border-bottom:1px solid #333;font-weight:bold;} td{border-bottom:1px solid #333333;} th,td{padding:4px 10px 4px 0;} tfoot{font-style:italic;} caption{background:#fff;margin-bottom:2em;text-align:left;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} [role=contentinfo]{clear:both;margin:20px 0;font-size:0.8125em;} [role=contentinfo]{list-style:none;margin:0;padding:0;}}
+@media screen{html{height:100%;overflow-y:scroll;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#f5f445 url(http://griddle.it/960-12-20?color=FFE5E5&num=false) repeat-y center;color:#333;font:normal 100% "Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",Verdana,"Verdana Ref",sans-serif;line-height:1.5;margin:0}#wrap{font-size:81.25%;margin:0 auto;padding:0;width:960px}#content{clear:both;overflow:hidden}[role=main]{float:;width:}[role=complementary]{float:;width:}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio[controls],canvas,video{display:inline-block;*display:inline;*zoom:1}a{color:#0069d6;font-weight:bold;text-decoration:none;vertical-align:baseline}a:link{-webkit-tap-highlight-color:#0050a3}a:hover,a:focus,a:active{color:#0050a3;text-decoration:underline}a:focus{outline:thin dotted}a:active{outline:0}a,button{-webkit-transition:color .5s linear;-o-transition:color .5s linear;-ms-transition:color .5s linear;-moz-transition:color .5s linear;transition:color .5s linear}h1,h2,h3{color:#2d3435}h1{font-size:2.25em;line-height:1.3333333333333333;margin:.6666666666666666em 0 0}h2{font-size:1.5em;line-height:1;margin:1em 0 0}h3{font-size:1.125em;line-height:1.3333333333333333;margin:1.3333333333333333em 0 0}h4{font-size:1em;line-height:1.5;margin:1.5em 0 0}p{line-height:1.5;margin:1em 0 0}p,li{-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto}ul,ol{margin:1em 0 0 1.5em;padding-left:1.5em}li{margin-bottom:.5em}ul{list-style:disc}ul ul{list-style:circle}ol{list-style:decimal}dt,dd{margin:0;padding:0}figure img,figure object,figure embed,figure video{max-width:100%;display:block}img{border:0}.ie7 img{-ms-interpolation-mode:bicubic}figure{position:relative}abbr[title],dfn[title]{border-bottom:1px dotted #000;cursor:help}.nav abbr[title]{border:0}b,strong{font-weight:bold}em{font-style:italic}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}blockquote{margin:0;padding:0}cite{display:block;text-align:right}table{border-collapse:collapse;border-spacing:0;font-size:inherit;font:1em}tr{vertical-align:top}th,td{padding:2px;vertical-align:top}::selection,::-webkit-selection{background:#9d261d;color:#FFF}::-moz-selection{background:#9d261d;color:#FFF}.hide{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}body:hover .hide a,body:hover .hide input,body:hover .hide button{display:none!important}.hide-text{text-indent:100%;white-space:nowrap;overflow:hidden}.ir{font:0/0 a;text-shadow:none;color:transparent}[role=navigation]{list-style:none;margin:0;padding:0}[role=banner]{position:relative}[role=banner] ul a{text-decoration:none}[role=banner] ul a:hover,[role=banner] ul a:focus,[role=banner] ul a:active,[role=banner] ul .active{color:#0050a3}.skip{margin:0}.skip a{background-color:#9d261d;color:#FFF;font-size:.7692em;left:-9999em;top:0;line-height:1;position:absolute;padding:.3em 0;text-align:center;width:100%}.skip a:focus,.skip a:active{left:0}.logo{float:left;margin:}.title{margin:0}.slogan{margin:0}.img-r{float:right;margin:.5em 0 1em 15px}.img-l{float:left;margin:.5em 15px 1em 0}img.centre{display:block;margin:1em auto}.map{border:1px solid #bfbfbf;display:inline;float:right;height:300px;margin:0 0 1em 15px;width:300px}.vcard{margin-bottom:2em}.vcard h3{margin:.5em 0 0}.vcard p{margin:0}.vcard em{font-style:normal;font-weight:bold}form img{border:0;float:none;margin:0;padding:0}form p{margin-top:1em}fieldset{background-color:#FFF;border:2px solid #2d3435;margin-top:2em;padding:4em 10px 10px 0;position:relative;width:330px}fieldset *{margin-left:10px}legend{*margin-left:-7px;padding:0}legend span{color:#2d3435;font-size:1.2308em;font-weight:bold;left:10px;letter-spacing:2px;margin:10px 0 1em 0;position:absolute;text-transform:uppercase}.ie6 legend,.ie7 legend{margin-left:-7px}label,button{cursor:pointer}label{display:block;font-weight:bold;float:left;margin-bottom:.2em;width:7em}button,input,select,textarea{font-size:1em;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal;*overflow:visible}select,input,textarea,button{font-family:sans-serif}input,textarea{font-size:14px;padding:2px 4px}input,textarea,select{border:1px solid #bfbfbf;margin-bottom:.5em;width:300px}textarea{overflow:auto;vertical-align:top}input[type="radio"],input[type="checkbox"]{border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;margin:0 5px 0 0;padding:0;width:auto}input[type="radio"]{vertical-align:text-bottom}input[type="checkbox"]{vertical-align:bottom;*vertical-align:baseline}input:hover,input:hover,textarea:hover,input:focus,input:focus,textarea:focus{background-color:#eaf1ff}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button{background-color:#fff;background-repeat:no-repeat;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),color-stop(0.25,#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(#fff,color-stop(0.25,#fff),#e6e6e6);background-image:-moz-linear-gradient(#fff,color-stop(#fff,0.25),#e6e6e6);background-image:-ms-linear-gradient(#fff,color-stop(#fff,0.25),#e6e6e6);background-image:-o-linear-gradient(#fff,color-stop(#fff,0.25),#e6e6e6);background-image:linear-gradient(#fff,color-stop(#fff,0.25),#e6e6e6);border:1px solid rgba(0,0,0,0.1);border-bottom-color:rgba(0,0,0,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);color:#333;display:-moz-inline-stack;display:inline-block;*display:inline!important;font-size:1.0769em;font-weight:bold;letter-spacing:1px;line-height:1;padding:.4em 10px;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);text-transform:uppercase;-moz-user-drag:-moz-none;-webkit-user-drag:none;user-drag:none;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;vertical-align:middle;behavior:url(/assets/js/PIE.htc);position:relative;left:6.5em;-webkit-appearance:button}button:hover,button:focus,button:active{background-color:#fff;background-repeat:no-repeat;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),color-stop(0.25,#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(#fff,color-stop(0.25,#f2f2f2),#ccc);background-image:-moz-linear-gradient(#fff,color-stop(#f2f2f2,0.25),#ccc);background-image:-ms-linear-gradient(#fff,color-stop(#f2f2f2,0.25),#ccc);background-image:-o-linear-gradient(#fff,color-stop(#f2f2f2,0.25),#ccc);background-image:linear-gradient(#fff,color-stop(#f2f2f2,0.25),#ccc);color:#333;text-decoration:none}button:active{bottom:-2px;left:7.51em}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}label.error{color:#C00;display:block;float:none;margin-left:7em;width:auto}input.error,input.error,textarea.error{border-color:#c00}input::-webkit-input-placeholder,input:-moz-placeholder{color:#bfbfbf}[placeholder]{cursor:pointer;color:#bfbfbf}[placeholder]:active,[placeholder]:focus{cursor:text;color:#808080;border:1px solid #0a0;-webkit-box-shadow:0 0 5px #0a0;-o-box-shadow:0 0 5px #0a0;-moz-box-shadow:0 0 5px #0a0;box-shadow:0 0 5px #0a0}[role=contentinfo]{clear:both;margin-top:2em;padding-top:1em;position:relative;text-align:center;width:100%}}@media print{@page{margin:.5cm}body{color:black;font-family:Verdana,sans-serif;font-size:10pt;width:600px}#wrap{width:100%!important}.nav,.skip,.aux-nav,.hide,form,[role=complementary],[role=contentinfo] a{display:none}h1,h2,h3{font-family:"Trebuchet MS",Verdana,sans-serif;margin:15px 0 5px}h2,h3{page-break-after:avoid}p,h2,h3{orphans:3;widows:3}a img{border:0}a:link,a:visited{color:#999;text-decoration:none}table{margin:1px;text-align:left}th{border-bottom:1px solid #333;font-weight:bold}td{border-bottom:1px solid #333}th,td{padding:4px 10px 4px 0}tfoot{font-style:italic}caption{background:#fff;margin-bottom:2em;text-align:left}thead{display:table-header-group}tr,img{page-break-inside:avoid}[role=contentinfo]{clear:both;margin:20px 0;font-size:.8125em}[role=contentinfo]{list-style:none;margin:0;padding:0}}
View
4 assets/js/jquery.html5form-1.5-min.js
@@ -0,0 +1,4 @@
+/**
+ * jQuery HTML5form by http://www.matiasmancini.com.ar/jquery-plugin-ajax-form-validation-html5.html
+ */
+(function($){$.fn.html5form=function(options){$(this).each(function(){var defaults={async:true,method:$(this).attr('method'),responseDiv:null,labels:'show',colorOn:'#000000',colorOff:'#a1a1a1',action:$(this).attr('action'),messages:false,emptyMessage:false,emailMessage:false,allBrowsers:true};var opts=$.extend({},defaults,options);if(!opts.allBrowsers){if($.browser.webkit&&parseInt($.browser.version)>=533){return false}if($.browser.mozilla&&parseInt($.browser.version)>=2){return false}if($.browser.opera&&parseInt($.browser.version)>=11){return false}}var form=$(this);var required=new Array();var email=new Array();function fillInput(input){if(input.attr('placeholder')&&input.attr('type')!='password'){input.val(input.attr('placeholder'));input.css('color',opts.colorOff)}else{if(!input.data('value')){if(input.val()!=''){input.data('value',input.val())}}else{input.val(input.data('value'))}input.css('color',opts.colorOn)}}if(opts.labels=='hide'){$(this).find('label').hide()}$.each($('select',this),function(){$(this).css('color',opts.colorOff);$(this).change(function(){$(this).css('color',opts.colorOn)})});$.each($(':input:visible:not(:button, :submit, :radio, :checkbox, select)',form),function(i){fillInput($(this));if(this.getAttribute('required')!=null){required[i]=$(this)}if(this.getAttribute('type')=='email'){email[i]=$(this)}$(this).bind('focus',function(ev){ev.preventDefault();if(this.value==$(this).attr('placeholder')){if(this.getAttribute('type')!='url'){$(this).attr('value','')}}$(this).css('color',opts.colorOn)});$(this).bind('blur',function(ev){ev.preventDefault();if(this.value==''){fillInput($(this))}else{if((this.getAttribute('type')=='url')&&($(this).val()==$(this).attr('placeholder'))){fillInput($(this))}}});$('textarea').filter(this).each(function(){if($(this).attr('maxlength')>0){$(this).keypress(function(ev){var cc=ev.charCode||ev.keyCode;if(cc==37||cc==39){return true}if(cc==8||cc==46){return true}if(this.value.length>=$(this).attr('maxlength')){return false}else{return true}})}})});$.each($('input:submit, input:image, input:button',this),function(){$(this).bind('click',function(ev){var emptyInput=null;var emailError=null;var input=$(':input:visible:not(:button, :submit, :radio, :checkbox, select)',form);$(required).each(function(key,value){if(value==undefined){return true}if(($(this).val()==$(this).attr('placeholder'))||($(this).val()=='')){emptyInput=$(this);if(opts.emptyMessage){$(opts.responseDiv).html('<p>'+opts.emptyMessage+'</p>')}else if(opts.messages=='es'){$(opts.responseDiv).html('<p>El campo '+$(this).attr('title')+' es requerido.</p>')}else if(opts.messages=='en'){$(opts.responseDiv).html('<p>The '+$(this).attr('title')+' field is required.</p>')}else if(opts.messages=='it'){$(opts.responseDiv).html('<p>Il campo '+$(this).attr('title')+' &eacute; richiesto.</p>')}else if(opts.messages=='de'){$(opts.responseDiv).html('<p>'+$(this).attr('title')+' ist ein Pflichtfeld.</p>')}else if(opts.messages=='fr'){$(opts.responseDiv).html('<p>Le champ '+$(this).attr('title')+' est requis.</p>')}else if(opts.messages=='nl'||opts.messages=='be'){$(opts.responseDiv).html('<p>'+$(this).attr('title')+' is een verplicht veld.</p>')}else if(opts.messages=='br'){$(opts.responseDiv).html('<p>O campo '+$(this).attr('title')+' &eacute; obrigat&oacute;rio.</p>')}else if(opts.messages=='br'){$(opts.responseDiv).html("<p>Insira um email v&aacute;lido por favor.</p>")}return false}return emptyInput});$(email).each(function(key,value){if(value==undefined){return true}if($(this).val().search(/[\w-\.]{3,}@([\w-]{2,}\.)*([\w-]{2,}\.)[\w-]{2,4}/i)){emailError=$(this);return false}return emailError});if(!emptyInput&&!emailError){$(input).each(function(){if($(this).val()==$(this).attr('placeholder')){$(this).val('')}});if(opts.async){var formData=$(form).serialize();$.ajax({url:opts.action,type:opts.method,data:formData,success:function(data){if(opts.responseDiv){$(opts.responseDiv).html(data)}$(input).val('');$.each(form[0],function(){fillInput($(this).not(':hidden, :button, :submit, :radio, :checkbox, select'));$('select',form).each(function(){$(this).css('color',opts.colorOff);$(this).children('option:eq(0)').attr('selected','selected')});$(':radio, :checkbox',form).removeAttr('checked')})}})}else{$(form).submit()}}else{if(emptyInput){$(emptyInput).focus().select()}else if(emailError){if(opts.emailMessage){$(opts.responseDiv).html('<p>'+opts.emailMessage+'</p>')}else if(opts.messages=='es'){$(opts.responseDiv).html('<p>Ingrese una direcci&oacute;n de correo v&aacute;lida por favor.</p>')}else if(opts.messages=='en'){$(opts.responseDiv).html('<p>Please type a valid email address.</p>')}else if(opts.messages=='it'){$(opts.responseDiv).html("<p>L'indirizzo e-mail non &eacute; valido.</p>")}else if(opts.messages=='de'){$(opts.responseDiv).html("<p>Bitte eine g&uuml;ltige E-Mail-Adresse eintragen.</p>")}else if(opts.messages=='fr'){$(opts.responseDiv).html("<p>Entrez une adresse email valide s&rsquo;il vous plait.</p>")}else if(opts.messages=='nl'||opts.messages=='be'){$(opts.responseDiv).html('<p>Voert u alstublieft een geldig email adres in.</p>')}$(emailError).select()}else{alert('Unknown Error')}}return false})})})}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.