mirror of
https://github.com/grocy/grocy.git
synced 2025-09-16 17:56:51 +00:00
Unified form validation handling
This commit is contained in:
@@ -68,11 +68,11 @@ $('#stockentry-form input').keyup(function(event)
|
||||
|
||||
$('#stockentry-form input').keydown(function(event)
|
||||
{
|
||||
if (event.keyCode === 13) //Enter
|
||||
if (event.keyCode === 13) // Enter
|
||||
{
|
||||
event.preventDefault();
|
||||
|
||||
if (document.getElementById('stockentry-form').checkValidity() === false) //There is at least one validation error
|
||||
if (!Grocy.FrontendHelpers.ValidateForm('stockentry-form'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user