diff options
author | Mario <mario@mariovavti.com> | 2021-04-15 09:26:47 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-04-15 09:26:47 +0000 |
commit | 4d3a555b53f3fdd710d7d502bb812d9a565a35f4 (patch) | |
tree | 1784b3145dcc892f7256a26cae179bdf7386466a /view/js/mod_register.js | |
parent | e35ab97b7ecbd96e11883bc194bfe9fb5a72e7f2 (diff) | |
download | volse-hubzilla-4d3a555b53f3fdd710d7d502bb812d9a565a35f4.tar.gz volse-hubzilla-4d3a555b53f3fdd710d7d502bb812d9a565a35f4.tar.bz2 volse-hubzilla-4d3a555b53f3fdd710d7d502bb812d9a565a35f4.zip |
register: minor fixes and template cleanup
Diffstat (limited to 'view/js/mod_register.js')
-rw-r--r-- | view/js/mod_register.js | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js index 948ba756b..7dbc2aca8 100644 --- a/view/js/mod_register.js +++ b/view/js/mod_register.js @@ -35,17 +35,11 @@ $(document).ready(function() { if (tao.zar.patema.test(tao.zar.form.email) == false ) { $('#help_email').removeClass('text-muted').addClass('text-danger').html(aStr['email_not_valid']); - zFormError('#help_email',true); } else { $.get('register/email_check.json?f=&email=' + encodeURIComponent(tao.zar.form.email), function(data) { $('#help_email').removeClass('text-muted').addClass('text-danger').html(data.message); - zFormError('#help_email',data.error); }); } - - if ($('#id_email').val().length > 0) { - $('#newchannel-submit-button').removeAttr('disabled'); - } }); $('#id_password').change(function() { @@ -74,7 +68,7 @@ $(document).ready(function() { }); $('#id_name').blur(function() { - $('#name-spinner').show(); + $('#name-spinner').fadeIn(); var zreg_name = $('#id_name').val(); $.get('new_channel/autofill.json?f=&name=' + encodeURIComponent(zreg_name),function(data) { $('#id_nickname').val(data); @@ -82,15 +76,13 @@ $(document).ready(function() { $('#help_name').html(''); zFormError('#help_name',data.error); } - $('#name-spinner').hide(); + $('#name-spinner').fadeOut(); }); }); $('#id_nickname').blur(function() { - if($('#id_name').val() === '') - return; - - $('#nick-spinner').show(); + $('#nick-spinner').fadeIn(); + $('#nick-hub').fadeOut(); var zreg_nick = $('#id_nickname').val(); $.get('new_channel/checkaddr.json?f=&nick=' + encodeURIComponent(zreg_nick),function(data) { $('#id_nickname').val(data); @@ -98,12 +90,13 @@ $(document).ready(function() { $('#help_nickname').html(''); zFormError('#help_nickname',data.error); } - $('#nick-spinner').hide(); + $('#nick-spinner').fadeOut(); + $('#nick-hub').fadeIn(); }); }); $('#register-form').submit(function(e) { - if ( $('.zform-error').length > 0 ) { + if ($('.zform-error').length > 0) { e.preventDefault(); return false; } |