Commit 9c40068189d3720472693c1fb0a85c65800e6a5c
1 parent
10b3e2ef
Exists in
master
and in
5 other branches
Fix signup
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
js/main.js
... | ... | @@ -1515,6 +1515,8 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers |
1515 | 1515 | } |
1516 | 1516 | $(document).trigger('login:success', data); |
1517 | 1517 | } else { |
1518 | + $signupForm.find('.cancel-signup').click(); | |
1519 | + $signupForm.hide(); | |
1518 | 1520 | var $message = $signupForm.siblings('#login-form').find('.message-success'); |
1519 | 1521 | $message.html('Cadastro efetuado com sucesso.<br/>Verifique seu email para confirmar o cadastro.'); |
1520 | 1522 | $message.show(); |
... | ... | @@ -1552,10 +1554,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers |
1552 | 1554 | ) |
1553 | 1555 | .always(function (data) { |
1554 | 1556 | $loading.hide(); |
1555 | - if(data && !data.activated) { | |
1556 | - $signupForm.find('.cancel-signup').click(); | |
1557 | - $signupForm.hide(); | |
1558 | - } else { | |
1557 | + if(!data || data.activated) { | |
1559 | 1558 | $signupForm.show(); |
1560 | 1559 | } |
1561 | 1560 | } | ... | ... |