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