]> BookStack Code Mirror - bookstack/blob - resources/views/settings/webhooks/parts/form.blade.php
Initial controller/views for webhooks management
[bookstack] / resources / views / settings / webhooks / parts / form.blade.php
1 {!! csrf_field() !!}
2
3 <div class="card content-wrap auto-height">
4     <h1 class="list-heading">{{ $title }}</h1>
5
6     <div class="setting-list">
7
8         <div class="grid half">
9             <div>
10                 <label class="setting-list-label">{{ trans('settings.webhooks_details') }}</label>
11                 <p class="small">{{ trans('settings.webhooks_details_desc') }}</p>
12             </div>
13             <div>
14                 <div class="form-group">
15                     <label for="name">{{ trans('settings.webhooks_name') }}</label>
16                     @include('form.text', ['name' => 'name'])
17                 </div>
18                 <div class="form-group">
19                     <label for="endpoint">{{ trans('settings.webhooks_endpoint') }}</label>
20                     @include('form.text', ['name' => 'endpoint'])
21                 </div>
22             </div>
23         </div>
24
25         <div component="webhook-events">
26             <label class="setting-list-label">{{ trans('settings.webhooks_events') }}</label>
27             <p class="small">{{ trans('settings.webhooks_events_desc') }}</p>
28             <p class="text-warn small">{{ trans('settings.webhooks_events_warning') }}</p>
29
30             <div>
31                 <label><input type="checkbox"
32                               name="events[]"
33                               value="all"
34                               refs="webhook-events@all">
35                     {{ trans('settings.webhooks_events_all') }}</label>
36             </div>
37
38             <hr class="my-m">
39
40             <div class="dual-column-content">
41                 @foreach(\BookStack\Actions\ActivityType::all() as $activityType)
42                     <label><input type="checkbox" name="events[]" value="{{ $activityType }}">{{ $activityType }}</label>
43                 @endforeach
44             </div>
45         </div>
46
47     </div>
48
49     <div class="form-group text-right">
50         <a href="{{ url("/settings/webhooks") }}" class="button outline">{{ trans('common.cancel') }}</a>
51         @if ($webhook->id ?? false)
52             <a href="{{ url("/settings/roles/delete/{$webhook->id}") }}" class="button outline">{{ trans('settings.webhooks_delete') }}</a>
53         @endif
54         <button type="submit" class="button">{{ trans('settings.webhooks_save') }}</button>
55     </div>
56
57 </div>