mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Started working on user-defined-fields for all entities (references #176)
This commit is contained in:
@@ -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');
|
||||
|
||||
|
Reference in New Issue
Block a user