mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-11-03 12:49:58 -06:00
40 lines
1.6 KiB
PHP
40 lines
1.6 KiB
PHP
@extends('layout.v3.session')
|
|
@section('content')
|
|
<div class="row">
|
|
<div class="col-lg-6 offset-lg-3 col-md-12 col-sm-12">
|
|
<div class="card card-danger card-outline">
|
|
<div class="card-header">
|
|
<h3 class="card-title">{{ trans('form.delete_webhook', ['title' => $webhook->title]) }}</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="text-danger">
|
|
{{ trans('form.permDeleteWarning') }}
|
|
</p>
|
|
|
|
<p>
|
|
{{ trans('form.webhook_areYouSure', ['title' => $webhook->title]) }}
|
|
</p>
|
|
</div>
|
|
<div class="card-footer text-end">
|
|
<a href="{{ URL::previous() }}" class="btn-outline-secondary btn">{{ trans('form.cancel') }}</a>
|
|
<input type="submit" id="button" name="submit" value="{{ trans('form.deletePermanently') }}"
|
|
class="btn btn-danger"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@section('scripts')
|
|
<script nonce="{{ $JS_NONCE }}">
|
|
$(function () {
|
|
"use strict";
|
|
$('#button').click(function() {
|
|
var url = "{{ route('index') }}/api/v1/webhooks/{{ $webhook->id }}";
|
|
$.ajax({url: url, type: 'DELETE'}).done(function() {
|
|
window.location = "{{ URL::previous() }}?webhook_id={{ $webhook->id }}&message=deleted";
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|