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 @@
}
});
$('#location-form input').keyup(function (event)
{
Grocy.FrontendHelpers.ValidateForm('location-form');
});
$('#location-form input').keydown(function (event)
{
if (event.keyCode === 13) //Enter
{
if (document.getElementById('location-form').checkValidity() === false) //There is at least one validation error
{
event.preventDefault();
return false;
}
else
{
$('#save-location-button').click();
}
}
});
$('#name').focus();
$('#location-form').validator();
$('#location-form').validator('validate');
Grocy.FrontendHelpers.ValidateForm('location-form');