aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_register.js
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-01-13 01:17:02 -0800
committerredmatrix <git@macgirvin.com>2016-01-13 01:17:02 -0800
commit3bf9dc9f181174e2cf946d2bff75300758951d72 (patch)
tree6b5896964fff8d321f63dd04224bafd063320055 /view/js/mod_register.js
parent58efd7553c9ec872a64d430efd90ff62c6b4e3e5 (diff)
downloadvolse-hubzilla-3bf9dc9f181174e2cf946d2bff75300758951d72.tar.gz
volse-hubzilla-3bf9dc9f181174e2cf946d2bff75300758951d72.tar.bz2
volse-hubzilla-3bf9dc9f181174e2cf946d2bff75300758951d72.zip
more work on auto channel creation during register
Diffstat (limited to 'view/js/mod_register.js')
-rw-r--r--view/js/mod_register.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js
index 95bc7bbbb..8430b4655 100644
--- a/view/js/mod_register.js
+++ b/view/js/mod_register.js
@@ -26,4 +26,25 @@ $(document).ready(function() {
zFormError("#register-password2-feedback", false);
}
});
+
+
+ $("#newchannel-name").blur(function() {
+ $("#name-spinner").spin('small');
+ var zreg_name = $("#newchannel-name").val();
+ $.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
+ $("#newchannel-nickname").val(data);
+ zFormError("#newchannel-name-feedback",data.error);
+ $("#name-spinner").spin(false);
+ });
+ });
+ $("#newchannel-nickname").blur(function() {
+ $("#nick-spinner").spin('small');
+ var zreg_nick = $("#newchannel-nickname").val();
+ $.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
+ $("#newchannel-nickname").val(data);
+ zFormError("#newchannel-nickname-feedback",data.error);
+ $("#nick-spinner").spin(false);
+ });
+ });
+
}); \ No newline at end of file