Allow to add a product picture on product creation (closes #1620)

This commit is contained in:
Bernd Bestel 2021-09-19 16:06:16 +02:00
parent 6175afa6be
commit 7aa9e5748e
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 6 additions and 7 deletions

View File

@ -2,6 +2,7 @@
- Fixed that plural form handling (e.g. for quantity units) was wrong for negative numbers
- Fixed that the context menu entries Consume and Transfer on the stock overview page were disabled when the amount in stock was < 1
- The product and chore edit pages now have bottom-sticky save buttons
- A product picture can now be added when creating a product (was currently only possible when editing a product)
### API
- Fixed that international characters were not allowed in API query filters

View File

@ -506,9 +506,9 @@
</div>
<div class="col-lg-6 col-12 @if($mode == 'create') d-none @endif">
<div class="col-lg-6 col-12">
<div class="row @if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif">
<div class="row @if($mode == 'create' || !GROCY_FEATURE_FLAG_STOCK) d-none @endif">
<div class="col">
<div class="title-related-links">
<h4>
@ -615,7 +615,7 @@
</div>
</div>
<div class="row mt-2">
<div class="row mt-2 @if($mode == 'create') d-none @endif">
<div class="col clearfix">
<div class="title-related-links">
<h4>
@ -646,7 +646,7 @@
</div>
</div>
<div class="row @if(GROCY_FEATURE_FLAG_STOCK) mt-5 @endif">
<div class="row @if(GROCY_FEATURE_FLAG_STOCK) mt-5 @endif @if($mode == 'create') d-none @endif">
<div class="col">
<div class="title-related-links">
<h4>
@ -733,7 +733,7 @@
</div>
</div>
<div class="row mt-5">
<div class="row @if($mode == 'edit') mt-5 @endif">
<div class="col">
<div class="title-related-links">
<h4>
@ -746,7 +746,6 @@
class="custom-file-input"
id="product-picture"
accept="image/*">
@if($mode == "edit")
<label id="product-picture-label"
class="custom-file-label @if(empty($product->picture_file_name)) d-none @endif"
for="product-picture">
@ -757,7 +756,6 @@
for="product-picture">
{{ $__t('No file selected') }}
</label>
@endif
</div>
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-trash"