Make it possible to hide locations/stores/QUs/product_groups/task_categories (closes #2222)

This commit is contained in:
Bernd Bestel
2023-05-13 14:24:52 +02:00
parent b5d3e68d68
commit 9cdb0908d6
22 changed files with 323 additions and 58 deletions

View File

@@ -6,7 +6,7 @@
@section('title', $__t('Create store'))
@endif
@section('viewJsName', 'shoppinglocationform')
@section('viewJsName', 'shoppingLocationform')
@section('content')
<div class="row">
@@ -25,7 +25,7 @@
@if($mode == 'edit')
<script>
Grocy.EditObjectId = {{ $shoppinglocation->id }};
Grocy.EditObjectId = {{ $shoppingLocation->id }};
</script>
@endif
@@ -39,16 +39,29 @@
required
id="name"
name="name"
value="@if($mode == 'edit'){{ $shoppinglocation->name }}@endif">
value="@if($mode == 'edit'){{ $shoppingLocation->name }}@endif">
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input @if($mode=='create'
)
checked
@elseif($mode=='edit'
&&
$shoppingLocation->active == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="active" name="active" value="1">
<label class="form-check-label custom-control-label"
for="active">{{ $__t('Active') }}</label>
</div>
</div>
<div class="form-group">
<label for="description">{{ $__t('Description') }}</label>
<textarea class="form-control"
rows="2"
id="description"
name="description">@if($mode == 'edit'){{ $shoppinglocation->description }}@endif</textarea>
name="description">@if($mode == 'edit'){{ $shoppingLocation->description }}@endif</textarea>
</div>
@include('components.userfieldsform', array(