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