Updating to allow addAuthorsToInformation and other custom forms to detect validation errors combined at top of page(method updated was findValidationErrors)
This commit is contained in:
parent
a01c0fc74c
commit
68e2cd7a58
1 changed files with 5 additions and 1 deletions
|
@ -41,8 +41,12 @@ vitro.customFormUtils = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Return true iff there are validation errors on the form
|
// Return true iff there are validation errors on the form
|
||||||
|
//Updating to include new functionality where errors are on top of page
|
||||||
findValidationErrors: function() {
|
findValidationErrors: function() {
|
||||||
|
var validationErrorSection = $('#error-alert');
|
||||||
|
if(validationErrorSection.length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return this.form.find('.validationError').length > 0;
|
return this.form.find('.validationError').length > 0;
|
||||||
|
|
||||||
// RY For now, we just need to look for the presence of the error elements.
|
// RY For now, we just need to look for the presence of the error elements.
|
||||||
|
|
Loading…
Add table
Reference in a new issue