Fixed all (or most of) the broken stuff after the dependency upgrade party

This commit is contained in:
Bernd Bestel
2018-07-11 19:43:05 +02:00
parent 71701804ea
commit 778191fd11
51 changed files with 553 additions and 498 deletions

View File

@@ -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');