Simplified "checkboxUncheckedValue" handling

This commit is contained in:
Bernd Bestel
2020-11-11 17:34:37 +01:00
parent 9949f30c2b
commit 9c81fc890b
19 changed files with 21 additions and 78 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -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)