mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Future-proof the submitForm for use with forms without validation.
We might decide to use it for other submissions than EditForm.
This commit is contained in:
parent
8168a7db09
commit
3f2ddbb3fb
@ -243,7 +243,8 @@ jQuery.noConflict();
|
||||
$(button).addClass('loading');
|
||||
|
||||
// validate if required
|
||||
if(!form.validate()) {
|
||||
var validationResult = form.validate();
|
||||
if(typeof validationResult!=='undefined' && !validationResult) {
|
||||
// TODO Automatically switch to the tab/position of the first error
|
||||
statusMessage("Validation failed.", "bad");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user