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:
@@ -72,11 +72,11 @@ $('#display_amount').on('keyup', function(e)
|
||||
|
||||
$('#barcode-form input').keydown(function(event)
|
||||
{
|
||||
if (event.keyCode === 13) //Enter
|
||||
if (event.keyCode === 13) // Enter
|
||||
{
|
||||
event.preventDefault();
|
||||
|
||||
if (document.getElementById('barcode-form').checkValidity() === false) //There is at least one validation error
|
||||
if (!Grocy.FrontendHelpers.ValidateForm('barcode-form'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user