2015-08-23 22:38:18 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
// $("#id_permissions_role").sSelect();
|
2016-03-20 08:06:33 +01:00
|
|
|
$("#id_name").blur(function() {
|
2015-08-23 22:38:18 +02:00
|
|
|
$("#name-spinner").spin('small');
|
2016-03-20 08:06:33 +01:00
|
|
|
var zreg_name = $("#id_name").val();
|
2015-08-23 22:38:18 +02:00
|
|
|
$.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
|
2016-03-20 08:06:33 +01:00
|
|
|
$("#id_nickname").val(data);
|
|
|
|
if(data.error) {
|
|
|
|
$("#help_name").html("");
|
|
|
|
zFormError("#help_name",data.error);
|
|
|
|
}
|
2015-08-23 22:38:18 +02:00
|
|
|
$("#name-spinner").spin(false);
|
|
|
|
});
|
|
|
|
});
|
2016-03-20 08:06:33 +01:00
|
|
|
|
|
|
|
$("#id_nickname").blur(function() {
|
2015-08-23 22:38:18 +02:00
|
|
|
$("#nick-spinner").spin('small');
|
2016-03-20 08:06:33 +01:00
|
|
|
var zreg_nick = $("#id_nickname").val();
|
2015-08-23 22:38:18 +02:00
|
|
|
$.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
|
2016-03-20 08:06:33 +01:00
|
|
|
$("#id_nickname").val(data);
|
|
|
|
if(data.error) {
|
|
|
|
$("#help_nickname").html("");
|
|
|
|
zFormError("#help_nickname",data.error);
|
|
|
|
}
|
2015-08-23 22:38:18 +02:00
|
|
|
$("#nick-spinner").spin(false);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|