aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-16 00:51:03 -0700
committerfriendica <info@friendica.com>2012-08-16 00:51:03 -0700
commiteb911443aaee63f414cd95de4dabf60e2f14a994 (patch)
tree7c8eb42e2602b572f430474648aec611f0c20c47 /view
parent5b547ae991624924c0ef11dbe36ae57f5ec2182b (diff)
downloadvolse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.tar.gz
volse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.tar.bz2
volse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.zip
more zregister cleanup and theme separation
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_zregister.js31
-rw-r--r--view/tpl/js_strings.tpl2
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,