Allow fraction numbers for recipe ingredients when not checked against stock and add option to not check stock for a recipe position (closes #105)

This commit is contained in:
Bernd Bestel
2018-11-02 19:53:01 +01:00
parent 960ee919f9
commit 04e9ba8e34
6 changed files with 114 additions and 10 deletions

View File

@@ -42,7 +42,7 @@
'label' => 'Amount',
'min' => 0,
'value' => $value,
'invalidFeedback' => $L('This cannot be negative'),
'invalidFeedback' => $L('This cannot be negative and must be an integral number'),
'additionalGroupCssClasses' => 'col-4'
))
@@ -55,6 +55,7 @@
</select>
<div class="invalid-feedback">{{ $L('A quantity unit is required') }}</div>
</div>
</div>
<div class="row">
<div class="col">
@@ -68,6 +69,12 @@
</div>
</div>
<div class="form-check mb-3">
<input type="hidden" name="not_check_stock_fulfillment" value="0">
<input @if($mode == 'edit' && $recipePos->not_check_stock_fulfillment == 1) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
<label class="form-check-label" for="not_check_stock_fulfillment">{{ $L('Disable stock fulfillment checking for this ingredient') }}</label>
</div>
<div class="form-group">
<label for="ingredient_group">{{ $L('Group') }}&nbsp;&nbsp;<span class="small text-muted">{{ $L('This will be used as a headline to group ingredients together') }}</span></label>
<input type="text" class="form-control" id="ingredient_group" name="ingredient_group" value="@if($mode == 'edit'){{ $recipePos->ingredient_group }}@endif">