mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Recipe form updates (#476)
* recipePosForm - hide when embeded productcard * recipeposform: remove prefillByName for productPicker * recipeform add data-product-id * recipeposform cleanup extra clicks * recipeform: bootbox the recipe pos edit button * recipeform: bootbox the recipe pos add button * recipeposform postMessage back * recipeform reload if IngredientsChanged * Fix page reload for new recipes (URL = /recipe/new) Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -28,11 +28,9 @@
|
||||
|
||||
<form id="recipe-pos-form" novalidate>
|
||||
|
||||
@php $prefillByName = ''; if($mode=='edit') { $prefillByName = FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->name; } @endphp
|
||||
@include('components.productpicker', array(
|
||||
'products' => $products,
|
||||
'nextInputSelector' => '#amount',
|
||||
'prefillByName' => $prefillByName
|
||||
'nextInputSelector' => '#amount'
|
||||
))
|
||||
|
||||
@php if($mode == 'edit') { $value = $recipePos->amount; } else { $value = 1; } @endphp
|
||||
@@ -96,7 +94,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6 col-xl-4">
|
||||
<div class="col-xs-12 col-md-6 col-xl-4 hide-when-embedded">
|
||||
@include('components.productcard')
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user