grocy/views/shoppinglistform.blade.php
Bernd Bestel 887526c727
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)
2020-11-17 19:11:02 +01:00

58 lines
1.1 KiB
PHP

@extends('layout.default')
@if($mode == 'edit')
@section('title', $__t('Edit shopping list'))
@else
@section('title', $__t('Create shopping list'))
@endif
@section('viewJsName', 'shoppinglistform')
@section('content')
<div class="row">
<div class="col">
<h2 class="title">@yield('title')</h2>
</div>
</div>
<hr class="my-2">
<div class="row">
<div class="col-lg-6 col-xs-12">
<script>
Grocy.EditMode = '{{ $mode }}';
</script>
@if($mode == 'edit')
<script>
Grocy.EditObjectId = {{ $shoppingList->id }};
</script>
@endif
<form id="shopping-list-form"
novalidate>
<div class="form-group">
<label for="name">{{ $__t('Name') }}</label>
<input type="text"
class="form-control"
required
id="name"
name="name"
value="@if($mode == 'edit'){{ $shoppingList->name }}@endif">
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
@include('components.userfieldsform', array(
'userfields' => $userfields,
'entity' => 'shopping_lists'
))
<button id="save-shopping-list-button"
class="btn btn-success">{{ $__t('Save') }}</button>
</form>
</div>
</div>
@stop