mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 21:06:15 +02:00
Add Save & return button to product form
Same concept as for recipes: when pressing this button, the user will stay at the form's site after saving.
This commit is contained in:
parent
007b427f1f
commit
248852b676
|
|
@ -411,6 +411,11 @@ Grocy.FrontendHelpers.ValidateForm('product-form');
|
|||
$("#allow_partial_units_in_stock").click();
|
||||
$("#allow_partial_units_in_stock").click();
|
||||
|
||||
$(document).on('click', '#save-product-button-continue', function () {
|
||||
Grocy.ProductEditFormRedirectUri = "reload";
|
||||
$('#save-product-button').click();
|
||||
});
|
||||
|
||||
$(document).on('click', '.qu-conversion-delete-button', function(e)
|
||||
{
|
||||
var objectId = $(e.currentTarget).attr('data-qu-conversion-id');
|
||||
|
|
|
|||
|
|
@ -371,8 +371,10 @@
|
|||
'entity' => 'products'
|
||||
))
|
||||
|
||||
<button id="save-product-button-continue"
|
||||
class="save-recipe btn btn-success mb-2">{{ $__t('Save & continue') }}</button>
|
||||
<button id="save-product-button"
|
||||
class="btn btn-success">{{ $__t('Save') }}</button>
|
||||
class="save-recipe btn btn-info mb-2">{{ $__t('Save') }}</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user