Remove "Allow partial units in stock" product option / unify number input validation messages

This commit is contained in:
Bernd Bestel
2020-11-16 19:10:29 +01:00
parent 95fc6a6faa
commit e85b21384f
59 changed files with 191 additions and 336 deletions

View File

@@ -55,7 +55,7 @@
<span class="text-danger">{{ $__t('Miss') }}: <span id="miss-count"
class="locale-number locale-number-generic">0</span></span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="scanned_codes"
name="scanned_codes"
multiple

View File

@@ -39,7 +39,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Battery') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="battery-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($batteries as $battery)

View File

@@ -71,7 +71,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option value="all">{{ $__t('All') }}</option>
<option value="duesoon">{{ $__t('Due soon') }}</option>

View File

@@ -21,7 +21,6 @@
'additionalAttributes' => 'data-setting-key="batteries_due_soon_days"',
'label' => 'Due soon days',
'min' => 1,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))

View File

@@ -68,8 +68,7 @@
'label' => 'Charge cycle interval (days)',
'value' => $value,
'min' => '0',
'hint' => $__t('0 means suggestions for the next charge cycle are disabled'),
'invalidFeedback' => $__t('This cannot be negative')
'hint' => $__t('0 means suggestions for the next charge cycle are disabled')
))
@include('components.userfieldsform', array(

View File

@@ -57,7 +57,7 @@
data-toggle="tooltip"
title=""></i></label>
<select required
class="form-control input-group-chore-period-type"
class="custom-control custom-select input-group-chore-period-type"
id="period_type"
name="period_type">
@foreach($periodTypes as $periodType)
@@ -76,7 +76,6 @@
'value' => $value,
'min' => '0',
'additionalCssClasses' => 'input-group-chore-period-type',
'invalidFeedback' => $__t('This cannot be negative'),
'additionalGroupCssClasses' => 'period-type-input period-type-dynamic-regular period-type-monthly'
))
@@ -151,7 +150,6 @@
'value' => $value,
'min' => '1',
'additionalCssClasses' => 'input-group-chore-period-type',
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalGroupCssClasses' => 'period-type-input period-type-daily period-type-weekly period-type-monthly period-type-yearly',
'hintId' => 'chore-period-interval-info'
))
@@ -163,7 +161,7 @@
data-toggle="tooltip"
title=""></i></label>
<select required
class="form-control input-group-chore-assignment-type"
class="custom-control custom-select input-group-chore-assignment-type"
id="assignment_type"
name="assignment_type">
@foreach($assignmentTypes as $assignmentType)
@@ -179,7 +177,7 @@
<label for="assignment_config">{{ $__t('Assign to') }}</label>
<select required
multiple
class="form-control input-group-chore-assignment-type selectpicker"
class="custom-control custom-select input-group-chore-assignment-type selectpicker"
id="assignment_config"
name="assignment_config"
data-actions-Box="true"
@@ -256,9 +254,8 @@
'id' => 'product_amount',
'label' => 'Amount',
'contextInfoId' => 'amount_qu_unit',
'min' => '',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'isRequired' => false,
'value' => $value,
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'

View File

@@ -39,7 +39,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Chore') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="chore-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($chores as $chore)

View File

@@ -76,7 +76,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option value="all">{{ $__t('All') }}</option>
<option value="duesoon">{{ $__t('Due soon') }}</option>
@@ -90,7 +90,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Assignment') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="user-filter">
<option></option>
@foreach($users as $user)

View File

@@ -21,7 +21,6 @@
'additionalAttributes' => 'data-setting-key="chores_due_soon_days"',
'label' => 'Due soon days',
'min' => 1,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))

View File

@@ -65,7 +65,7 @@
<div class="invalid-feedback">{{ $invalidFeedback }}</div>
</div>
<div id="datetimepicker-earlier-than-info"
class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
class="form-text text-info font-italic w-100 d-none">{{ $earlierThanInfoText }}</div>
@if(isset($shortcutValue) && isset($shortcutLabel))
<div class="form-group mt-n2 mb-0">
<div class="custom-control custom-checkbox">

View File

@@ -61,7 +61,7 @@
<div class="invalid-feedback">{{ $invalidFeedback }}</div>
</div>
<div id="datetimepicker2-earlier-than-info"
class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
class="form-text text-info font-italic w-100 d-none">{{ $earlierThanInfoText }}</div>
@if(isset($shortcutValue) && isset($shortcutLabel))
<div class="form-group mt-n2 mb-0>
<div class="

View File

@@ -16,6 +16,7 @@
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
@php if(!isset($noNameAttribute)) { $noNameAttribute = false; } @endphp
@php if(empty($contextInfoId)) { $additionalHtmlContextHelp = ''; } @endphp
@php if(!isset($invalidFeedback)) { $invalidFeedback = ''; } @endphp
<div id="group-{{ $id }}"
class="form-group {{ $additionalGroupCssClasses }}">
@@ -47,6 +48,7 @@
min="{{ number_format($min, $decimals, '.', '') }}"
max="{{ number_format($max, $decimals, '.', '') }}"
step="@if($decimals == 0){{1}}@else{{'.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1'}}@endif"
data-decimals="{{ $decimals }}"
@if($isRequired)
required
@endif>

View File

@@ -21,7 +21,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('This cannot be negative and must be an integral number'),
'additionalGroupCssClasses' => 'col-sm-5 col-xs-12 my-0',
'additionalCssClasses' => 'input-group-productamountpicker locale-number-input locale-number-quantity-amount',
'additionalHtmlContextHelp' => '',
@@ -33,7 +32,7 @@
<select @if($isRequired)
required
@endif
class="form-control input-group-productamountpicker"
class="custom-control custom-select input-group-productamountpicker"
id="qu_id"
name="qu_id"
data-initial-qu-id="{{ $initialQuId }}">

View File

@@ -89,7 +89,7 @@
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_LIST)
<div class="form-group">
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
<select class="form-control userfield-input"
<select class="custom-control custom-select userfield-input"
data-userfield-name="{{ $userfield->name }}">
<option></option>
@foreach(preg_split('/\r\n|\r|\n/', $userfield->config) as $option)
@@ -101,7 +101,7 @@
<div class="form-group">
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
<select multiple
class="form-control userfield-input selectpicker"
class="custom-control custom-select userfield-input selectpicker"
data-userfield-name="{{ $userfield->name }}"
data-actions-Box="true"
data-live-search="true">

View File

@@ -82,7 +82,7 @@
<div class="form-group">
<label for="location_id">{{ $__t('Location') }}</label>
<select required
class="form-control location-combobox"
class="custom-control custom-select location-combobox"
id="location_id"
name="location_id">
<option></option>
@@ -122,7 +122,7 @@
</label>
</div>
<select disabled
class="form-control mt-2"
class="custom-control custom-select mt-2"
id="specific_stock_entry"
name="specific_stock_entry">
<option></option>

View File

@@ -28,7 +28,6 @@
@include('components.productamountpicker', array(
'value' => 1,
'label' => 'New stock amount',
'additionalAttributes' => 'data-not-equal="-1"',
'additionalHtmlElements' => '<div id="inventory-change-info"
class="form-text text-muted d-none ml-3 my-0 w-100"></div>',
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info"
@@ -82,14 +81,13 @@
@include('components.numberpicker', array(
'id' => 'price',
'label' => 'Price',
'min' => 0,
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_prices'],
'value' => '',
'hint' => $__t('Per stock quantity unit', GROCY_CURRENCY),
'additionalHtmlContextHelp' => '<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
title="' . $__t('This will apply to added products') . '"></i>',
'invalidFeedback' => $__t('The price cannot be lower than %s', '0'),
'isRequired' => false,
'additionalCssClasses' => 'locale-number-input locale-number-currency'
))

View File

@@ -28,30 +28,45 @@
@endpush
@section('content')
<h1 class="d-print-none">
@yield('title')
<a class="btn btn-outline-dark responsive-button print-all-locations-button"
href="#">
<i class="fas fa-print"></i> {{ $__t('Print') . ' (' . $__t('all locations') . ')' }}
</a>
</h1>
<h5 class="mb-5 d-print-none">
<small class="text-muted">{{ $__t('Here you can print a page per location with the current stock, maybe to hang it there and note the consumed things on it.') }}</small>
</h5>
<div class="title-related-links d-print-none">
<h2 class="title">
@yield('title')
<i class="fas fa-question-circle text-muted small"
data-toggle="tooltip"
title="{{ $__t('Here you can print a page per location with the current stock, maybe to hang it there and note the consumed things on it') }}"></i>
</h2>
<div class="float-right">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button"
data-toggle="collapse"
data-target="#related-links">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-outline-dark responsive-button m-1 mt-md-0 mb-md-0 float-right print-all-locations-button"
href="#">
{{ $__t('Print') . ' (' . $__t('all locations') . ')' }}
</a>
</div>
</div>
<hr class="my-2 d-print-none">
@foreach($locations as $location)
<div class="page">
<h1 class="text-center">
<h1 class="pt-4">
<img src="{{ $U('/img/grocy_logo.svg?v=', true) }}{{ $version }}"
height="30"
class="d-none d-print-flex mx-auto">
{{ $location->name }}
<a class="btn btn-outline-dark responsive-button print-single-location-button d-print-none"
<a class="btn btn-outline-dark btn-sm responsive-button print-single-location-button d-print-none"
href="#">
<i class="fas fa-print"></i> {{ $__t('Print') . ' (' . $__t('this location') . ')' }}
{{ $__t('Print') . ' (' . $__t('this location') . ')' }}
</a>
</h1>
<h6 class="text-center mb-4 d-none d-print-block">
<h6 class="mb-4 d-none d-print-block">
{{ $__t('Time of printing') }}:
<span class="d-inline print-timestamp"></span>
</h6>

View File

@@ -65,7 +65,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => '1',
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))

View File

@@ -72,7 +72,7 @@
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<div class="form-group">
<label for="shopping_location_id_id">{{ $__t('Store') }}</label>
<select class="form-control"
<select class="custom-control custom-select"
id="shopping_location_id"
name="shopping_location_id">
<option></option>

View File

@@ -105,7 +105,7 @@
<div class="form-group">
<label for="location_id">{{ $__t('Default location') }}</label>
<select required
class="form-control"
class="custom-control custom-select"
id="location_id"
name="location_id">
<option></option>
@@ -142,10 +142,9 @@
@include('components.numberpicker', array(
'id' => 'min_stock_amount',
'label' => 'Minimum stock amount',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'min' => '0.',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'additionalGroupCssClasses' => 'mb-1',
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
@@ -212,7 +211,6 @@
'label' => 'Default due days',
'min' => -1,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '-1'),
'hint' => $__t('For purchases this amount of days will be added to today for the due date suggestion') . ' (' . $__t('-1 means that this product wille be never overdue') . ')'
))
@@ -223,7 +221,6 @@
'label' => 'Default due days after opened',
'min' => 0,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '-1'),
'hint' => $__t('When this product was marked as opened, the expiry date will be replaced by today + this amount of days (a value of 0 disables this)')
))
@else
@@ -245,7 +242,7 @@
<div class="form-group">
<label for="product_group_id">{{ $__t('Product group') }}</label>
<select class="form-control"
<select class="custom-control custom-select"
id="product_group_id"
name="product_group_id">
<option></option>
@@ -263,7 +260,7 @@
data-toggle="tooltip"
title="{{ $__t('Quantity unit stock cannot be changed after first purchase') }}"></i>
<select required
class="form-control input-group-qu"
class="custom-control custom-select input-group-qu"
id="qu_id_stock"
name="qu_id_stock"
@if($mode=='edit'
@@ -286,7 +283,7 @@
data-toggle="tooltip"
title="{{ $__t('This is the default quantity unit used when adding this product to the shopping list') }}"></i>
<select required
class="form-control input-group-qu"
class="custom-control custom-select input-group-qu"
id="qu_id_purchase"
name="qu_id_purchase">
<option></option>
@@ -306,22 +303,11 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalCssClasses' => 'input-group-qu locale-number-input locale-number-quantity-amount',
'additionalHtmlElements' => '<p id="qu-conversion-info"
class="form-text text-info d-none"></p>'
))
<div class="form-group">
<div class="custom-control custom-checkbox">
<input @if($mode=='edit'
&&
$product->allow_partial_units_in_stock == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="allow_partial_units_in_stock" name="allow_partial_units_in_stock" value="1">
<label class="form-check-label custom-control-label"
for="allow_partial_units_in_stock">{{ $__t('Allow partial units in stock') }}</label>
</div>
</div>
<div class="form-group mb-1">
<div class="custom-control custom-checkbox">
<input @if($mode=='edit'
@@ -344,7 +330,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
'additionalAttributes' => $additionalAttributes,
'contextInfoId' => 'tare_weight_qu_info',
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
@@ -379,7 +364,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts']),
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'hint' => $__t('Per stock quantity unit'),
'isRequired' => false,
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
@@ -392,7 +376,6 @@
'label' => 'Default due days after freezing',
'min' => -1,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'hint' => $__t('On moving this product to a freezer location (so when freezing it), the expiry date will be replaced by today + this amount of days')
))
@@ -402,7 +385,6 @@
'label' => 'Default due days after thawing',
'min' => -1,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'hint' => $__t('On moving this product from a freezer location (so when thawing it), the due date will be replaced by today + this amount of days')
))
@else
@@ -419,8 +401,8 @@
'id' => 'quick_consume_amount',
'label' => 'Quick consume amount',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'hint' => $__t('This amount is used for the "quick consume/open buttons" on the stock overview page (related to quantity unit stock)'),
'contextInfoId' => 'quick_consume_qu_info',
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
@@ -520,12 +502,12 @@
@endif
<td>
@if(!empty($barcode->qu_id))
<span class="locale-number locale-number-quantity-amount">{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $barcode->qu_id)->name }}</span>
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $barcode->qu_id)->name }}
@endif
</td>
<td>
@if(!empty($barcode->amount))
{{ $barcode->amount }}
<span class="locale-number locale-number-quantity-amount">{{ $barcode->amount }}</span>
@endif
</td>
</tr>

View File

@@ -62,7 +62,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Product group') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="product-group-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($productGroups as $productGroup)

View File

@@ -15,7 +15,7 @@
</script>
<div class="row">
<div class="col-xs-12 col-md-6 col-xl-4">
<div class="col-xs-12 col-md-6 col-xl-4 pb-3">
<div class="title-related-links">
<h2 class="title">@yield('title')</h2>
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3 hide-when-embedded"
@@ -105,7 +105,6 @@
'decimals' => $userSettings['stock_decimal_places_prices'],
'value' => '',
'contextInfoId' => 'price-hint',
'invalidFeedback' => $__t('The price cannot be lower than %s', '0'),
'isRequired' => false,
'additionalGroupCssClasses' => 'mb-1',
'additionalCssClasses' => 'locale-number-input locale-number-currency'

View File

@@ -51,7 +51,7 @@
<div class="form-group">
<label for="from_qu_id">{{ $__t('Quantity unit from') }}</label>
<select required
class="form-control input-group-qu"
class="custom-control custom-select input-group-qu"
id="from_qu_id"
name="from_qu_id">
<option></option>
@@ -68,7 +68,7 @@
<div class="form-group">
<label for="to_qu_id">{{ $__t('Quantity unit to') }}</label>
<select required
class="form-control input-group-qu"
class="custom-control custom-select input-group-qu"
id="to_qu_id"
name="to_qu_id">
<option></option>
@@ -88,7 +88,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %1$s and must be a valid number with max. %2$s decimal places', '0', $userSettings['stock_decimal_places_amounts']),
'additionalHtmlElements' => '<p id="qu-conversion-info"
class="form-text text-info d-none"></p>',
'additionalCssClasses' => 'input-group-qu locale-number-input locale-number-quantity-amount'

View File

@@ -25,7 +25,7 @@
<div class="form-group">
<label for="qu_id">{{ $__t('Quantity unit') }}</label>
<select class="form-control"
<select class="custom-control custom-select"
id="qu_id"
name="qu_id">
<option></option>

View File

@@ -68,7 +68,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'hint' => $__t('The ingredients listed here result in this amount of servings'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
@@ -365,7 +364,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => '1',
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))

View File

@@ -113,7 +113,6 @@
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => '',
'hint' => $__t('The resulting price of this ingredient will be multiplied by this factor'),
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
'isRequired' => true,
'value' => $value,
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'

View File

@@ -56,7 +56,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option value="all">{{ $__t('All') }}</option>
<option value="Xenoughinstock">{{ $__t('Enough in stock') }}</option>
@@ -333,7 +333,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $recipe->desired_servings,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalAttributes' => 'data-recipe-id="' . $recipe->id . '"',
'hint' => $__t('Base: %s', $recipe->base_servings),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'

View File

@@ -49,7 +49,7 @@
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<div class="my-auto float-right">
<select class="form-control form-control-sm"
<select class="custom-control custom-select"
id="selected-shopping-list">
@foreach($shoppingLists as $shoppingList)
<option @if($shoppingList->id == $selectedShoppingListId) selected="selected" @endif value="{{ $shoppingList->id }}">{{ $shoppingList->name }}</option>
@@ -143,7 +143,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option value="all">{{ $__t('All') }}</option>
<option class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif"

View File

@@ -40,7 +40,7 @@
@if(GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS)
<div class="form-group">
<label for="shopping_list_id">{{ $__t('Shopping list') }}</label>
<select class="form-control"
<select class="custom-control custom-select"
id="shopping_list_id"
name="shopping_list_id">
@foreach($shoppingLists as $shoppingList)
@@ -73,7 +73,6 @@
'value' => $value,
'initialQuId' => $initialQuId,
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1'),
'isRequired' => false
))

View File

@@ -57,9 +57,9 @@
'id' => 'amount',
'value' => $stockEntry->amount,
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'label' => 'Amount',
'contextInfoId' => 'amount_qu_unit',
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
@@ -81,7 +81,6 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_prices'],
'hint' => $__t('Per stock quantity unit'),
'invalidFeedback' => $__t('The price cannot be lower than %s', '0'),
'isRequired' => false,
'additionalCssClasses' => 'locale-number-input locale-number-currency'
))

View File

@@ -50,7 +50,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Product') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="product-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($products as $product)

View File

@@ -99,7 +99,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Location') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="location-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($locations as $location)
@@ -114,7 +114,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Product group') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="product-group-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($productGroups as $productGroup)
@@ -128,7 +128,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option class="bg-white"
value="all">{{ $__t('All') }}</option>
@@ -190,7 +190,7 @@
<i class="fas fa-utensils"></i> <span class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->quick_consume_amount }}</span>
</a>
<a id="product-{{ $currentStockEntry->product_id }}-consume-all-button"
class="permission-STOCK_CONSUME d-none d-sm-inline-block btn btn-danger btn-sm product-consume-button @if($currentStockEntry->amount == 0) disabled @endif"
class="permission-STOCK_CONSUME btn btn-danger btn-sm product-consume-button @if($currentStockEntry->amount == 0) disabled @endif"
href="#"
data-toggle="tooltip"
data-placement="right"
@@ -222,17 +222,6 @@
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="table-inline-menu dropdown-menu dropdown-menu-right">
<a id="product-{{ $currentStockEntry->product_id }}-consume-all-button"
class="d-inline-block d-sm-none dropdown-item show-as-dialog-link text-danger product-consume-button @if($currentStockEntry->amount == 0) disabled @endif"
href="#"
data-toggle="tooltip"
data-placement="right"
data-product-id="{{ $currentStockEntry->product_id }}"
data-product-name="{{ $currentStockEntry->product_name }}"
data-product-qu-name="{{ $currentStockEntry->qu_unit_name }}"
data-consume-amount="{{ $currentStockEntry->amount }}">
<span class="dropdown-item-icon"><i class="fas fa-utensils"></i></span> <span class="dropdown-item-text">{{ $__t('Consume all %s which are currently in stock', $currentStockEntry->product_name) }}</span>
</a>
<a class="dropdown-item show-as-dialog-link permission-SHOPPINGLIST_ITEMS_ADD"
type="button"
href="{{ $U('/shoppinglistitem/new?embedded&updateexistingproduct&product=' . $currentStockEntry->product_id ) }}">

View File

@@ -21,7 +21,7 @@
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
<div class="form-group">
<label for="product_presets_location_id">{{ $__t('Location') }}</label>
<select class="form-control user-setting-control"
<select class="custom-control custom-select user-setting-control"
id="product_presets_location_id"
data-setting-key="product_presets_location_id">
<option value="-1"></option>
@@ -34,7 +34,7 @@
<div class="form-group">
<label for="product_presets_product_group_id">{{ $__t('Product group') }}</label>
<select class="form-control user-setting-control"
<select class="custom-control custom-select user-setting-control"
id="product_presets_product_group_id"
data-setting-key="product_presets_product_group_id">
<option value="-1"></option>
@@ -46,7 +46,7 @@
<div class="form-group">
<label for="product_presets_qu_id">{{ $__t('Quantity unit') }}</label>
<select class="form-control user-setting-control"
<select class="custom-control custom-select user-setting-control"
id="product_presets_qu_id"
data-setting-key="product_presets_qu_id">
<option value="-1"></option>
@@ -63,7 +63,6 @@
'additionalAttributes' => 'data-setting-key="stock_due_soon_days"',
'label' => 'Due soon days',
'min' => 1,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))
@@ -87,7 +86,6 @@
'label' => 'Default amount for purchase',
'min' => 0,
'decimals' => $userSettings['stock_decimal_places_amounts'],
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control locale-number-input locale-number-quantity-amount',
))
@@ -124,7 +122,6 @@
'label' => 'Default amount for consume',
'min' => 0,
'decimals' => $userSettings['stock_decimal_places_amounts'],
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control locale-number-input locale-number-quantity-amount'
))
@@ -135,8 +132,6 @@
'additionalAttributes' => 'data-setting-key="stock_decimal_places_amounts"',
'label' => 'Decimal places allowed for amounts',
'min' => 0,
'decimals' => 0,
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
'additionalCssClasses' => 'user-setting-control'
))
@@ -145,8 +140,6 @@
'additionalAttributes' => 'data-setting-key="stock_decimal_places_prices"',
'label' => 'Decimal places allowed for prices',
'min' => 0,
'decimals' => 0,
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
'additionalCssClasses' => 'user-setting-control'
))

View File

@@ -74,7 +74,7 @@
<div class="form-group">
<label for="category_id">{{ $__t('Category') }}</label>
<select class="form-control"
<select class="custom-control custom-select"
id="category_id"
name="category_id">
<option></option>

View File

@@ -78,7 +78,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Status') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="status-filter">
<option value="all">{{ $__t('All') }}</option>
<option value="duesoon">{{ $__t('Due soon') }}</option>

View File

@@ -21,7 +21,6 @@
'additionalAttributes' => 'data-setting-key="tasks_due_soon_days"',
'label' => 'Due soon days',
'min' => 1,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))

View File

@@ -29,7 +29,7 @@
<div class="form-group">
<label for="location_id_from">{{ $__t('From location') }}</label>
<select required
class="form-control location-combobox"
class="custom-control custom-select location-combobox"
id="location_id_from"
name="location_id_from">
<option></option>
@@ -50,7 +50,7 @@
<div class="form-group">
<label for="location_id_to">{{ $__t('To location') }}</label>
<select required
class="form-control location-combobox"
class="custom-control custom-select location-combobox"
id="location_id_to"
name="location_id_to">
<option></option>
@@ -77,7 +77,7 @@
</label>
</div>
<select disabled
class="form-control mt-2"
class="custom-control custom-select mt-2"
id="specific_stock_entry"
name="specific_stock_entry">
<option></option>

View File

@@ -35,7 +35,7 @@
<div class="form-group">
<label for="entity">{{ $__t('Entity') }}</label>
<select required
class="form-control"
class="custom-control custom-select"
id="entity"
name="entity">
<option></option>
@@ -74,7 +74,7 @@
<div class="form-group">
<label for="type">{{ $__t('Type') }}</label>
<select required
class="form-control"
class="custom-control custom-select"
id="type"
name="type">
<option></option>

View File

@@ -55,7 +55,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-filter"></i>&nbsp;{{ $__t('Entity') }}</span>
</div>
<select class="form-control"
<select class="custom-control custom-select"
id="entity-filter">
<option value="all">{{ $__t('All') }}</option>
@foreach($entities as $entity)

View File

@@ -18,7 +18,7 @@
<div class="form-group">
<label for="locale">{{ $__t('Language') }}</label>
<select class="form-control user-setting-control"
<select class="custom-control custom-select user-setting-control"
id="locale"
data-setting-key="locale">
<option value="">{{ $__t('Default') }}</option>