Merge branch 'fix/dot-in-role-names' of git://github.com/cw1998/BookStack into cw1998-fix/dot-in-role-names

This commit is contained in:
Dan Brown 2019-04-16 23:08:23 +01:00
commit efc034bd8d
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -3,10 +3,10 @@
@foreach($roles as $role) @foreach($roles as $role)
<div> <div>
@include('components.custom-checkbox', [ @include('components.custom-checkbox', [
'name' => $name . '[' . $role->name . ']', 'name' => $name . '[' . str_replace('.', 'DOT', $role->name) . ']',
'label' => $role->display_name, 'label' => $role->display_name,
'value' => $role->id, 'value' => $role->id,
'checked' => old($name . '.' . $role->name) || (!old('name') && isset($model) && $model->hasRole($role->name)) 'checked' => old($name . '.' . str_replace('.', 'DOT', $role->name)) || (!old('name') && isset($model) && $model->hasRole($role->name))
]) ])
</div> </div>
@endforeach @endforeach