form improvements
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
@php
|
||||
/** @var \App\View\Widget $w */
|
||||
@endphp
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-md-{{$w->fieldCols}} offset-md-{{$w->labelCols}}">
|
||||
<div class="custom-control custom-checkbox{{ $errors->has($w->name) ? ' is-invalid' : '' }}">
|
||||
<input type="checkbox" class="custom-control-input"
|
||||
id="field-{{ $w->name }}"
|
||||
{{+$w->value?'checked':''}}
|
||||
name="{{ $w->name }}">
|
||||
<label class="custom-control-label" for="field-{{ $w->name }}">{{ $w->label }}</label>
|
||||
</div>
|
||||
|
||||
@if ($errors->has($w->name))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first($w->name) }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@include('form._help')
|
||||
</div>
|
||||
Reference in New Issue
Block a user