mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Also use the productamountpicker on the shopping list item page (refernces #1015)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
@php if(empty($additionalHtmlContextHelp)) { $additionalHtmlContextHelp = ''; } @endphp
|
||||
@php if(empty($additionalHtmlElements)) { $additionalHtmlElements = ''; } @endphp
|
||||
@php if(empty($label)) { $label = 'Amount'; } @endphp
|
||||
@php if(empty($initialQuId)) { $initialQuId = '-1'; } @endphp
|
||||
|
||||
<div class="form-group row {{ $additionalGroupCssClasses }}">
|
||||
<div class="col">
|
||||
|
@@ -9,6 +9,11 @@
|
||||
@section('viewJsName', 'shoppinglistitemform')
|
||||
|
||||
@section('content')
|
||||
<script>
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!};
|
||||
Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!};
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h2 class="title">@yield('title')</h2>
|
||||
@@ -62,13 +67,9 @@
|
||||
))
|
||||
</div>
|
||||
@php if($mode == 'edit') { $value = $listItem->amount; } else { $value = 1; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'amount',
|
||||
'label' => 'Amount',
|
||||
'hintId' => 'amount_qu_unit',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
@include('components.productamountpicker', array(
|
||||
'value' => $value,
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1')
|
||||
))
|
||||
|
||||
|
Reference in New Issue
Block a user