mirror of
https://github.com/grocy/grocy.git
synced 2025-08-28 17:10:11 +00:00
Simplified "checkboxUncheckedValue" handling
This commit is contained in:
@@ -205,9 +205,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="track_date_only"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$chore->track_date_only == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="track_date_only" name="track_date_only" value="1">
|
||||
@@ -222,9 +219,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="rollover"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$chore->rollover == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="rollover" name="rollover" value="1">
|
||||
@@ -240,9 +234,6 @@
|
||||
@if(GROCY_FEATURE_FLAG_STOCK)
|
||||
<div class="form-group mt-4 mb-1">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="consume_product_on_execution"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$chore->consume_product_on_execution == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="consume_product_on_execution" name="consume_product_on_execution" value="1">
|
||||
|
@@ -69,9 +69,6 @@
|
||||
@if(isset($shortcutValue) && isset($shortcutLabel))
|
||||
<div class="form-group mt-n2 mb-0">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="datetimepicker-shortcut"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="datetimepicker-shortcut"
|
||||
|
@@ -67,9 +67,6 @@
|
||||
<div class="
|
||||
custom-control
|
||||
custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="datetimepicker2-shortcut"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="datetimepicker2-shortcut"
|
||||
|
@@ -77,12 +77,13 @@
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="form-check-input userfield-input custom-control-input"
|
||||
<input class="form-check-input custom-control-input userfield-input"
|
||||
type="checkbox"
|
||||
id="userfield-{{ $userfield->name }}"
|
||||
data-userfield-name="{{ $userfield->name }}"
|
||||
value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
for="userfield-{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_LIST)
|
||||
|
@@ -60,9 +60,6 @@
|
||||
<div id="consume-exact-amount-group"
|
||||
class="form-group d-none">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="consume-exact-amount"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="consume-exact-amount"
|
||||
@@ -98,9 +95,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="use_specific_stock_entry"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="use_specific_stock_entry"
|
||||
@@ -123,9 +117,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="spoiled"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="spoiled"
|
||||
|
@@ -54,9 +54,6 @@
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRODUCT_FREEZING)
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="is_freezer"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$location->is_freezer == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="is_freezer" name="is_freezer" value="1">
|
||||
|
@@ -64,9 +64,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="active"
|
||||
value="1">
|
||||
<input @if($mode=='create'
|
||||
)
|
||||
checked
|
||||
@@ -154,9 +151,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="cumulate_min_stock_amount_of_sub_products"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$product->cumulate_min_stock_amount_of_sub_products == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="cumulate_min_stock_amount_of_sub_products" name="cumulate_min_stock_amount_of_sub_products" value="1">
|
||||
@@ -261,9 +255,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="allow_partial_units_in_stock"
|
||||
value="0">
|
||||
<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">
|
||||
@@ -274,9 +265,6 @@
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="enable_tare_weight_handling"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$product->enable_tare_weight_handling == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="enable_tare_weight_handling" name="enable_tare_weight_handling" value="1">
|
||||
@@ -306,9 +294,6 @@
|
||||
@if(GROCY_FEATURE_FLAG_RECIPES)
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="not_check_stock_fulfillment_for_recipes"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$product->not_check_stock_fulfillment_for_recipes == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_stock_fulfillment_for_recipes" name="not_check_stock_fulfillment_for_recipes" value="1">
|
||||
|
@@ -96,9 +96,6 @@
|
||||
|
||||
<div class="form-group @if($mode == 'edit') d-none @endif">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="create_inverse:skip"
|
||||
value="0">
|
||||
<input checked
|
||||
class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
|
@@ -74,9 +74,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="not_check_shoppinglist"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$recipe->not_check_shoppinglist == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_shoppinglist" name="not_check_shoppinglist" value="1">
|
||||
|
@@ -48,9 +48,6 @@
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="only_check_single_unit_in_stock"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$recipePos->only_check_single_unit_in_stock == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="only_check_single_unit_in_stock" name="only_check_single_unit_in_stock" value="1">
|
||||
@@ -80,9 +77,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="not_check_stock_fulfillment"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
($recipePos->not_check_stock_fulfillment == 1 || FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->not_check_stock_fulfillment_for_recipes == 1)) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
|
||||
|
@@ -124,9 +124,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="open"
|
||||
value="1">
|
||||
<input @if($stockEntry->open == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="open" name="open" value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="open">{{ $__t('Opened') }}</label>
|
||||
|
@@ -49,9 +49,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="use_specific_stock_entry"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="use_specific_stock_entry"
|
||||
|
@@ -69,9 +69,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="show_in_sidebar_menu"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$userentity->show_in_sidebar_menu == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="show_in_sidebar_menu" name="show_in_sidebar_menu" value="1">
|
||||
|
@@ -98,9 +98,6 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="show_as_column_in_tables"
|
||||
value="0">
|
||||
<input @if($mode=='edit'
|
||||
&&
|
||||
$userfield->show_as_column_in_tables == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="show_as_column_in_tables" name="show_as_column_in_tables" value="1">
|
||||
|
Reference in New Issue
Block a user