mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Make it possible to copy products (closes #571)
This commit is contained in:
@@ -185,7 +185,17 @@
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '-1'),
|
||||
'hint' => $__t('When this product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)')
|
||||
))
|
||||
@else
|
||||
<input type="hidden"
|
||||
name="default_best_before_days_after_open"
|
||||
id="default_best_before_days_after_open"
|
||||
value="1">
|
||||
@endif
|
||||
@else
|
||||
<input type="hidden"
|
||||
name="default_best_before_days"
|
||||
id="default_best_before_days"
|
||||
value="1">
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
@@ -310,6 +320,12 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<input type="hidden"
|
||||
name="not_check_stock_fulfillment_for_recipes"
|
||||
id="not_check_stock_fulfillment_for_recipes"
|
||||
value="0">
|
||||
@endif
|
||||
|
||||
@php if($mode == 'edit') { $value = $product->calories; } else { $value = 0; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
@@ -323,7 +339,6 @@
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
|
||||
))
|
||||
@endif
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRODUCT_FREEZING)
|
||||
@php if($mode == 'edit') { $value = $product->default_best_before_days_after_freezing; } else { $value = 0; } @endphp
|
||||
|
@@ -118,6 +118,12 @@
|
||||
title="{{ $__t('Edit this item') }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary btn-sm"
|
||||
href="{{ $U('/product/new?copy-of=') }}{{ $product->id }}"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Copy this item') }}">
|
||||
<i class="fas fa-copy"></i>
|
||||
</a>
|
||||
<a class="btn btn-danger btn-sm product-delete-button @if($product->active == 0) disabled @endif"
|
||||
href="#"
|
||||
data-product-id="{{ $product->id }}"
|
||||
|
Reference in New Issue
Block a user