diff options
author | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
---|---|---|
committer | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
commit | c38c79d71c8ef70ef649f83e322f1984b75ee2dd (patch) | |
tree | 958fcd22f04546f40b6ac68bb58cfe1a1b1fb7f6 /view/js/mod_new_channel.js | |
parent | 1806da0851dd5cf5978b19d12783ae3101a11257 (diff) | |
parent | 45a854762b451dafb882bc56efce054b64420627 (diff) | |
download | volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.gz volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.bz2 volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.zip |
Merge branch 'redmatrix-master'
Diffstat (limited to 'view/js/mod_new_channel.js')
-rw-r--r-- | view/js/mod_new_channel.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js index c4d5408f2..17b354a4b 100644 --- a/view/js/mod_new_channel.js +++ b/view/js/mod_new_channel.js @@ -1,20 +1,27 @@ $(document).ready(function() { // $("#id_permissions_role").sSelect(); - $("#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); }); }); |