diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_zregister.js | 31 | ||||
-rw-r--r-- | view/tpl/js_strings.tpl | 2 |
2 files changed, 33 insertions, 0 deletions
diff --git a/view/js/mod_zregister.js b/view/js/mod_zregister.js new file mode 100644 index 000000000..c9935e47f --- /dev/null +++ b/view/js/mod_zregister.js @@ -0,0 +1,31 @@ + $(document).ready(function() { + $("#zregister-email").blur(function() { + var zreg_email = $("#zregister-email").val(); + $.get("zregister/email_check.json?f=&email=" + encodeURIComponent(zreg_email),function(data) { + $("#zregister-email-feedback").html(data.message); + zFormError("#zregister-email-feedback",data.error); + }); + }); + $("#zregister-password").blur(function() { + if(($("#zregister-password").val()).length < 6 ) { + $("#zregister-password-feedback").html(aStr['pwshort']); + zFormError("#zregister-password-feedback",true); + } + else { + $("#zregister-password-feedback").html(""); + zFormError("#zregister-password-feedback",false); + } + }); + $("#zregister-password2").blur(function() { + if($("#zregister-password").val() != $("#zregister-password2").val()) { + $("#zregister-password2-feedback").html(aStr['pwnomatch']); + zFormError("#zregister-password2-feedback",true); + } + else { + $("#zregister-password2-feedback").html(""); + zFormError("#zregister-password2-feedback",false); + } + }); + }); + +</script> diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index db3bb7d7c..9e5fb77bd 100644 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -7,6 +7,8 @@ 'comment' : '$comment', 'showmore' : '$showmore', 'showfewer' : '$showfewer', + 'pwshort' : '$pwshort', + 'pwnomatch' : 'pwnomatch', 't01' : $t01, 't02' : $t02, |