File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/resources/views/crud/fields Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1414
1515 <div class =" d-inline-flex align-items-center" >
1616 {{-- Switch --}}
17- <label class =" form-switch switch switch-sm switch-label switch-pill switch-{{ $field [' color' ] } } mb-0" @if ($field [' color' ] !== ' var(--bg-switch-checked-color)' ) style =" --bg-switch-checked-color : {{ $field[' color' ] }};" @endif >
17+ <label class =" form-switch switch switch-sm switch-label switch-pill switch-{{ $field [' color' ] } } mb-0" @if ($field [' color' ] !== ' var(--bg-switch-checked-color, black )' ) style =" --bg-switch-checked-color : {{ $field[' color' ] }};" @endif >
1818 <input
1919 type =" hidden"
2020 name =" {{ $field [' name' ] } }"
2323 type =" checkbox"
2424 data-init-function =" bpFieldInitSwitch"
2525 {{ (bool ) $field [' value' ] ? ' checked' : ' ' } }
26- class =" switch-input form-check-input"
26+ class =" switch-input form-check-input"
2727 />
2828 <span
2929 class =" switch-slider"
@@ -87,10 +87,10 @@ function bpFieldInitSwitch($element) {
8787 @bassetBlock (' backpack/crud/fields/switch-field.css' )
8888 <style >
8989 .switch-input :checked + .switch-slider {
90- background-color : var (--bg-switch-checked-color );
90+ background-color : var (--bg-switch-checked-color , black );
9191 }
9292 .form-switch .form-check-input :checked {
93- background-color : var (--bg-switch-checked-color );
93+ background-color : var (--bg-switch-checked-color , black );
9494 }
9595 </style >
9696 @endBassetBlock
You can’t perform that action at this time.
0 commit comments