aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_register.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/mod_register.js')
-rw-r--r--view/js/mod_register.js16
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');
}