2016-02-27 14:24:42 -05:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<div class="toggle-switch-list dual-column-content">
|
2022-12-16 12:44:13 -05:00
|
|
|
<input type="hidden" name="{{ $name }}[0]" value="0">
|
2019-02-03 08:45:45 -05:00
|
|
|
@foreach($roles as $role)
|
|
|
|
<div>
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('form.custom-checkbox', [
|
2020-08-04 09:55:01 -04:00
|
|
|
'name' => $name . '[' . strval($role->id) . ']',
|
2019-02-03 08:45:45 -05:00
|
|
|
'label' => $role->display_name,
|
|
|
|
'value' => $role->id,
|
2020-08-04 09:55:01 -04:00
|
|
|
'checked' => old($name . '.' . strval($role->id)) || (!old('name') && isset($model) && $model->hasRole($role->id))
|
2019-02-03 08:45:45 -05:00
|
|
|
])
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
2016-02-27 14:24:42 -05:00
|
|
|
|
|
|
|
@if($errors->has($name))
|
|
|
|
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
|
|
|
|
@endif
|