1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00
hubzilla_ynh/sources/view/js/mod_new_channel.js

30 lines
873 B
JavaScript
Raw Normal View History

$(document).ready(function() {
// $("#id_permissions_role").sSelect();
2016-03-20 08:06:33 +01:00
$("#id_name").blur(function() {
$("#name-spinner").spin('small');
2016-03-20 08:06:33 +01:00
var zreg_name = $("#id_name").val();
$.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);
}
$("#name-spinner").spin(false);
});
});
2016-03-20 08:06:33 +01:00
$("#id_nickname").blur(function() {
$("#nick-spinner").spin('small');
2016-03-20 08:06:33 +01:00
var zreg_nick = $("#id_nickname").val();
$.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);
}
$("#nick-spinner").spin(false);
});
});
});