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

23 lines
828 B
JavaScript
Raw Normal View History

$(document).ready(function() {
// $("#id_permissions_role").sSelect();
$("#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);
});
});
});