mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
Fix submit proceeded even if legacy widget failed validation
This commit is contained in:
parent
fd53dfe82b
commit
278f75546a
@ -947,10 +947,7 @@ export class etemplate2
|
||||
let submit = _widget.submit(values);
|
||||
if(submit === false)
|
||||
{
|
||||
if(!invalid && !_widget.isValid([]))
|
||||
{
|
||||
invalid.push(_widget);
|
||||
}
|
||||
invalid.push(_widget);
|
||||
}
|
||||
else if(submit instanceof Promise)
|
||||
{
|
||||
@ -1039,8 +1036,8 @@ export class etemplate2
|
||||
if(invalid_widgets[0] && invalid_widgets[0] instanceof et2_widget)
|
||||
{
|
||||
let messages = [];
|
||||
let valid = invalid.isValid(messages);
|
||||
invalid.set_validation_error(messages);
|
||||
let valid = invalid_widgets[0].isValid(messages);
|
||||
invalid_widgets[0].set_validation_error(messages);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user