Squashed commit

Fixed number input min/max amount handling
Only (auto) save valid user inputs
More filters on the stock journal pages
Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131)
Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120)
Render shopping list userfields (closes #1052)
Fixed Focus when adding included recipes (closes #1019)
Order all base objects with NOCASE (closes #1086)
This commit is contained in:
Bernd Bestel
2020-11-17 19:11:02 +01:00
parent 1316c1f25f
commit 887526c727
40 changed files with 556 additions and 178 deletions

View File

@@ -4,7 +4,7 @@
@php if(!isset($value)) { $value = 1; } @endphp
@php if(empty($min)) { $min = 0; } @endphp
@php if(empty($max)) { $max = 999999; } @endphp
@php if(!isset($max)) { $max = ''; } @endphp
@php if(empty($decimals)) { $decimals = 0; } @endphp
@php if(empty($hint)) { $hint = ''; } @endphp
@php if(empty($hintId)) { $hintId = ''; } @endphp
@@ -20,7 +20,8 @@
<div id="group-{{ $id }}"
class="form-group {{ $additionalGroupCssClasses }}">
<label for="{{ $id }}">
<label class="w-100"
for="{{ $id }}">
{{ $__t($label) }}
@if(!empty($hint) || !empty($hintId))
<i id="{{ $hintId }}"
@@ -31,7 +32,7 @@
{!! $additionalHtmlContextHelp !!}
@if(!empty($contextInfoId))
<span id="{{ $contextInfoId }}"
class="small text-muted"></span>
class="small text-muted float-right mt-1"></span>
@endif
</label>
<div class="input-group">
@@ -46,8 +47,10 @@
@endif
value="{{ $value }}"
min="{{ number_format($min, $decimals, '.', '') }}"
@if(!empty($max))
max="{{ number_format($max, $decimals, '.', '') }}"
step="@if($decimals == 0){{1}}@else{{'.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1'}}@endif"
@endif
step="@if($decimals == 0){{1}}@else{{'.' . str_repeat('0', $decimals - 1) . '1'}}@endif"
data-decimals="{{ $decimals }}"
@if($isRequired)
required

View File

@@ -101,7 +101,7 @@
<div class="form-group">
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
<select multiple
class="custom-control custom-select userfield-input selectpicker"
class="form-control userfield-input selectpicker"
data-userfield-name="{{ $userfield->name }}"
data-actions-Box="true"
data-live-search="true">