@include('form.custom-checkbox', [
'name' => 'entity-permissions-inherit',
- 'label' => 'Inherit defaults',
+ 'label' => trans('entities.permissions_inherit_defaults'),
'value' => 'true',
'checked' => $inheriting
])
+
- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view', 'disabled' => $inheriting])
-
-
- @if(!$model instanceof \BookStack\Entities\Models\Page)
- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create', 'disabled' => $inheriting])
- @endif
+ @include('form.custom-checkbox', [
+ 'name' => 'permissions[' . $role->id . '][view]',
+ 'label' => trans('common.view'),
+ 'value' => 'true',
+ 'checked' => $permission->view,
+ 'disabled' => $inheriting
+ ])
+ @if($entityType !== 'page')
+
+ @include('form.custom-checkbox', [
+ 'name' => 'permissions[' . $role->id . '][create]',
+ 'label' => trans('common.create') . ($entityType === 'bookshelf' ? ' *' : ''),
+ 'value' => 'true',
+ 'checked' => $permission->create,
+ 'disabled' => $inheriting
+ ])
+
+ @endif
- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update', 'disabled' => $inheriting])
+ @include('form.custom-checkbox', [
+ 'name' => 'permissions[' . $role->id . '][update]',
+ 'label' => trans('common.update'),
+ 'value' => 'true',
+ 'checked' => $permission->update,
+ 'disabled' => $inheriting
+ ])
- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete', 'disabled' => $inheriting])
+ @include('form.custom-checkbox', [
+ 'name' => 'permissions[' . $role->id . '][delete]',
+ 'label' => trans('common.delete'),
+ 'value' => 'true',
+ 'checked' => $permission->delete,
+ 'disabled' => $inheriting
+ ])