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