Commit fc051cdd76d9c0bd5583bb79434dc20651d0c346

Authored by Victor Costa
1 parent 4d609979

Fix terms of use validation

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
js/main.js
... ... @@ -1547,13 +1547,13 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
1547 1547 hasPasswordEquals = $inputPassword.val() === $inputPasswordConfirmation.val();
1548 1548 }
1549 1549  
1550   - var hasAcceptation = $inputAcceptation.val();
  1550 + var hasAcceptation = $inputAcceptation.prop('checked');
1551 1551 var hasCaptcha = $inputCaptcha.val().length > 0;
1552 1552 var hasError = (!hasEmail || !hasUsername || !hasPassword || !hasPasswordConfirmation || !hasPasswordEquals || !hasAcceptation || !hasCaptcha);
1553 1553  
1554 1554 if(hasError){
1555 1555  
1556   - if ($signupForm[0].checkValidity()) { // force check of HTML5 validation
  1556 + if ($signupForm[0].checkValidity() || !hasAcceptation) { // force check of HTML5 validation
1557 1557 e.preventDefault();
1558 1558  
1559 1559 var messageErrors = [];
... ...