aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_register.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-02-22 13:04:48 +0100
committerMario Vavti <mario@mariovavti.com>2016-02-22 13:04:48 +0100
commitdd6e3d873d2ff04cb2549530fa838ad58b06cdbc (patch)
tree0264f166d307c3b5422f4666f4f124e1ff59140c /view/js/mod_register.js
parentf9b092c6194fe2a2812cb0ae687e19b1f5680c98 (diff)
downloadvolse-hubzilla-dd6e3d873d2ff04cb2549530fa838ad58b06cdbc.tar.gz
volse-hubzilla-dd6e3d873d2ff04cb2549530fa838ad58b06cdbc.tar.bz2
volse-hubzilla-dd6e3d873d2ff04cb2549530fa838ad58b06cdbc.zip
some work on mod/register
Diffstat (limited to 'view/js/mod_register.js')
-rw-r--r--view/js/mod_register.js58
1 files changed, 32 insertions, 26 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js
index 8430b4655..f1f3e7f71 100644
--- a/view/js/mod_register.js
+++ b/view/js/mod_register.js
@@ -1,50 +1,56 @@
$(document).ready(function() {
- $("#register-email").blur(function() {
- var zreg_email = $("#register-email").val();
+ $("#id_email").blur(function() {
+ var zreg_email = $("#id_email").val();
$.get("register/email_check.json?f=&email=" + encodeURIComponent(zreg_email), function(data) {
- $("#register-email-feedback").html(data.message);
- zFormError("#register-email-feedback",data.error);
+ $("#help_email").html(data.message);
+ zFormError("#help_email",data.error);
});
});
- $("#register-password").blur(function() {
- if(($("#register-password").val()).length < 6 ) {
- $("#register-password-feedback").html(aStr.pwshort);
- zFormError("#register-password-feedback", true);
+ $("#id_password").blur(function() {
+ if(($("#id_password").val()).length < 6 ) {
+ $("#help_password").html(aStr.pwshort);
+ zFormError("#help_password", true);
}
else {
- $("#register-password-feedback").html("");
- zFormError("#register-password-feedback", false);
+ $("#help_password").html("");
+ zFormError("#help_password", false);
}
});
- $("#register-password2").blur(function() {
- if($("#register-password").val() != $("#register-password2").val()) {
- $("#register-password2-feedback").html(aStr.pwnomatch);
- zFormError("#register-password2-feedback", true);
+ $("#id_password2").blur(function() {
+ if($("#id_password").val() != $("#id_password2").val()) {
+ $("#help_password2").html(aStr.pwnomatch);
+ zFormError("#help_password2", true);
}
else {
- $("#register-password2-feedback").html("");
- zFormError("#register-password2-feedback", false);
+ $("#help_password2").html("");
+ zFormError("#help_password2", false);
}
});
-
- $("#newchannel-name").blur(function() {
+ $("#id_name").blur(function() {
$("#name-spinner").spin('small');
- var zreg_name = $("#newchannel-name").val();
+ var zreg_name = $("#id_name").val();
$.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
- $("#newchannel-nickname").val(data);
- zFormError("#newchannel-name-feedback",data.error);
+ $("#id_nickname").val(data);
+ if(data.error) {
+ $("#help_name").html("");
+ zFormError("#help_name",data.error);
+ }
$("#name-spinner").spin(false);
});
});
- $("#newchannel-nickname").blur(function() {
+
+ $("#id_nickname").blur(function() {
$("#nick-spinner").spin('small');
- var zreg_nick = $("#newchannel-nickname").val();
+ var zreg_nick = $("#id_nickname").val();
$.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
- $("#newchannel-nickname").val(data);
- zFormError("#newchannel-nickname-feedback",data.error);
+ $("#id_nickname").val(data);
+ if(data.error) {
+ $("#help_nickname").html("");
+ zFormError("#help_nickname",data.error);
+ }
$("#nick-spinner").spin(false);
});
});
-}); \ No newline at end of file
+});