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/chores', jsonData,
function(result)
{
window.location.href = U('/chores');
Grocy.EditObjectId = result.created_object_id;
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/chores');
});
},
function(xhr)
{
@@ -24,7 +28,10 @@
Grocy.Api.Put('objects/chores/' + Grocy.EditObjectId, jsonData,
function(result)
{
window.location.href = U('/chores');
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/chores');
});
},
function(xhr)
{
@@ -66,6 +73,7 @@ for (var i = 0; i < checkboxValues.length; i++)
}
}
Grocy.Components.UserfieldsForm.Load();
$('#name').focus();
Grocy.FrontendHelpers.ValidateForm('chore-form');