]> BookStack Code Mirror - bookstack/blob - resources/views/form/restriction-form.blade.php
Added basic system tests for markdown editor, Added extra test helpers
[bookstack] / resources / views / form / restriction-form.blade.php
1 <form action="{{ $model->getUrl() }}/restrict" method="POST">
2     {!! csrf_field() !!}
3     <input type="hidden" name="_method" value="PUT">
4
5     <div class="form-group">
6         @include('form/checkbox', ['name' => 'restricted', 'label' => 'Restrict this ' . $model->getClassName()])
7     </div>
8
9     <table class="table">
10         <tr>
11             <th>Role</th>
12             <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>Actions</th>
13         </tr>
14         @foreach($roles as $role)
15             <tr>
16                 <td>{{ $role->display_name }}</td>
17                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'View', 'action' => 'view'])</td>
18                 @if(!$model->isA('page'))
19                     <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Create', 'action' => 'create'])</td>
20                 @endif
21                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Update', 'action' => 'update'])</td>
22                 <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Delete', 'action' => 'delete'])</td>
23             </tr>
24         @endforeach
25     </table>
26
27     <a href="{{ $model->getUrl() }}" class="button muted">Cancel</a>
28     <button type="submit" class="button pos">Save Restrictions</button>
29 </form>