- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])
+ @if($role->id === 0)
+
+ @include('form.custom-checkbox', [
+ 'name' => 'entity-permissions-inherit',
+ 'label' => trans('entities.permissions_inherit_defaults'),
+ 'value' => 'true',
+ 'checked' => $inheriting
+ ])
+
- @if(!$model->isA('page'))
- @include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])
- @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'])
+ @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'])
+ @include('form.custom-checkbox', [
+ 'name' => 'permissions[' . $role->id . '][delete]',
+ 'label' => trans('common.delete'),
+ 'value' => 'true',
+ 'checked' => $permission->delete,
+ 'disabled' => $inheriting
+ ])