mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Load userobject forms in dialogs
This commit is contained in:
@@ -14,8 +14,15 @@
|
||||
{
|
||||
Grocy.EditObjectId = result.created_object_id;
|
||||
Grocy.Components.UserfieldsForm.Save(function()
|
||||
{
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
window.parent.postMessage(WindowMessageBag("Reload"), Grocy.BaseUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
|
||||
}
|
||||
});
|
||||
},
|
||||
function(xhr)
|
||||
@@ -31,8 +38,15 @@
|
||||
function(result)
|
||||
{
|
||||
Grocy.Components.UserfieldsForm.Save(function()
|
||||
{
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
window.parent.postMessage(WindowMessageBag("Reload"), Grocy.BaseUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
|
||||
}
|
||||
});
|
||||
},
|
||||
function(xhr)
|
||||
|
@@ -30,8 +30,8 @@
|
||||
</div>
|
||||
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right"
|
||||
id="related-links">
|
||||
<a class="btn btn-primary responsive-button mr-1"
|
||||
href="{{ $U('/userobject/' . $userentity->name . '/new') }}">
|
||||
<a class="btn btn-primary responsive-button mr-1 show-as-dialog-link"
|
||||
href="{{ $U('/userobject/' . $userentity->name . '/new?embedded') }}">
|
||||
{{ $__t('Add') }}
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary d-print-none"
|
||||
@@ -87,8 +87,8 @@
|
||||
@foreach($userobjects as $userobject)
|
||||
<tr>
|
||||
<td class="fit-content border-right d-print-none">
|
||||
<a class="btn btn-info btn-sm"
|
||||
href="{{ $U('/userobject/' . $userentity->name . '/') }}{{ $userobject->id }}"
|
||||
<a class="btn btn-info btn-sm show-as-dialog-link"
|
||||
href="{{ $U('/userobject/' . $userentity->name . '/') }}{{ $userobject->id }}?embedded"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Edit this item') }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
|
Reference in New Issue
Block a user