Started working on user-defined-fields for all entities (references #176)

This commit is contained in:
Bernd Bestel
2019-04-22 22:16:35 +02:00
parent 77f3b80540
commit fc11da3c3f
45 changed files with 1161 additions and 78 deletions

View File

@@ -10,7 +10,11 @@
Grocy.Api.Post('objects/quantity_units', jsonData,
function(result)
{
window.location.href = U('/quantityunits');
Grocy.EditObjectId = result.created_object_id;
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/quantityunits');
});
},
function(xhr)
{
@@ -24,7 +28,10 @@
Grocy.Api.Put('objects/quantity_units/' + Grocy.EditObjectId, jsonData,
function(result)
{
window.location.href = U('/quantityunits');
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/quantityunits');
});
},
function(xhr)
{
@@ -57,5 +64,6 @@ $('#quantityunit-form input').keydown(function(event)
}
});
Grocy.Components.UserfieldsForm.Load();
$('#name').focus();
Grocy.FrontendHelpers.ValidateForm('quantityunit-form');