mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 03:40:10 +00:00
Fixed all (or most of) the broken stuff after the dependency upgrade party
This commit is contained in:
@@ -30,6 +30,26 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#quantityunit-form input').keyup(function(event)
|
||||
{
|
||||
Grocy.FrontendHelpers.ValidateForm('quantityunit-form');
|
||||
});
|
||||
|
||||
$('#quantityunit-form input').keydown(function(event)
|
||||
{
|
||||
if (event.keyCode === 13) //Enter
|
||||
{
|
||||
if (document.getElementById('quantityunit-form').checkValidity() === false) //There is at least one validation error
|
||||
{
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#save-quantityunit-button').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#name').focus();
|
||||
$('#quantityunit-form').validator();
|
||||
$('#quantityunit-form').validator('validate');
|
||||
Grocy.FrontendHelpers.ValidateForm('quantityunit-form');
|
||||
|
Reference in New Issue
Block a user