Fix shopping list edit form - product was not prefilled (fixes #115)

This commit is contained in:
Bernd Bestel
2018-11-26 19:37:17 +01:00
parent e92d74f5c3
commit 5cdf2c14d3
4 changed files with 13 additions and 8 deletions

View File

@@ -21,10 +21,12 @@
<form id="shoppinglist-form" novalidate>
@php if($mode == 'edit') { $productId = $listItem->product_id; } else { $productId = ''; } @endphp
@include('components.productpicker', array(
'products' => $products,
'nextInputSelector' => '#amount',
'isRequired' => false
'isRequired' => false,
'prefillById' => $productId
))
@php if($mode == 'edit') { $value = $listItem->amount; } else { $value = 1; } @endphp