diff options
author | Mario <mario@mariovavti.com> | 2021-04-08 15:03:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-04-08 15:03:05 +0000 |
commit | cb2d8b4ba62f2510a1305bbe95452f4de008286a (patch) | |
tree | a6518bcc7dbd71280734ca1c59baec67e8a3c5d2 | |
parent | a9da370c0bf5777a0345744667240ef0c615dcaa (diff) | |
download | volse-hubzilla-cb2d8b4ba62f2510a1305bbe95452f4de008286a.tar.gz volse-hubzilla-cb2d8b4ba62f2510a1305bbe95452f4de008286a.tar.bz2 volse-hubzilla-cb2d8b4ba62f2510a1305bbe95452f4de008286a.zip |
register: minor js cleanup
-rw-r--r-- | view/js/mod_register.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js index 3f8f50898..19be1576f 100644 --- a/view/js/mod_register.js +++ b/view/js/mod_register.js @@ -14,19 +14,17 @@ $(document).ready(function() { $('#id_email').change(function() { tao.zar.form.email = $('#id_email').val(); - if (tao.zar.patano.test(tao.zar.form.email) == true ) { - //ano + + 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 { - 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) { + $.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'); } |