mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added active toggle to webhooks
To allow easy temporary de-activation without deletion or other workarounds. Updated tests to cover.
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
<tr>
|
||||
<th>{{ trans('common.name') }}</th>
|
||||
<th>{{ trans('settings.webhook_events_table_header') }}</th>
|
||||
<th>{{ trans('common.status') }}</th>
|
||||
</tr>
|
||||
@foreach($webhooks as $webhook)
|
||||
<tr>
|
||||
@ -39,12 +40,15 @@
|
||||
{{ $webhook->trackedEvents->count() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ trans('common.status_' . ($webhook->active ? 'active' : 'inactive')) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@else
|
||||
<p class="text-muted empty-text">
|
||||
{{ trans('common.no_items') }}
|
||||
<p class="text-muted empty-text px-none">
|
||||
{{ trans('settings.webhooks_none_created') }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
|
@ -9,6 +9,14 @@
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.webhooks_details') }}</label>
|
||||
<p class="small">{{ trans('settings.webhooks_details_desc') }}</p>
|
||||
<div>
|
||||
@include('form.toggle-switch', [
|
||||
'name' => 'active',
|
||||
'value' => old('active') ?? $model->active ?? true,
|
||||
'label' => trans('settings.webhooks_active'),
|
||||
])
|
||||
@include('form.errors', ['name' => 'active'])
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group">
|
||||
|
Reference in New Issue
Block a user