Skip to content

Commit

Permalink
Revert "netteForms.js: added Nette.stopOnError"
Browse files Browse the repository at this point in the history
This reverts commit 0ad1fcc.
  • Loading branch information
dg committed Jun 30, 2016
1 parent f97b8e6 commit 9953926
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/assets/netteForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

var Nette = {};

Nette.stopOnError = true;


/**
* Attaches a handler to an event for the element.
*/
Expand Down Expand Up @@ -208,7 +205,7 @@ Nette.validateForm = function(sender) {
}
}

var radios = {}, i, elem, success = true;
var radios = {}, i, elem;

for (i = 0; i < form.elements.length; i++) {
elem = form.elements[i];
Expand All @@ -227,12 +224,11 @@ Nette.validateForm = function(sender) {
continue;
}

success = Nette.validateControl(elem) && success;
if (!success && Nette.stopOnError) {
break;
if (!Nette.validateControl(elem)) {
return false;
}
}
return success;
return true;
};


Expand Down

0 comments on commit 9953926

Please sign in to comment.