mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
delete bitcoin event
This commit is contained in:
@@ -62,6 +62,13 @@ class BitcoinEventForm extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteMe()
|
||||||
|
{
|
||||||
|
$this->bitcoinEvent->delete();
|
||||||
|
|
||||||
|
return redirect($this->fromUrl);
|
||||||
|
}
|
||||||
|
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
|||||||
@@ -8,14 +8,22 @@
|
|||||||
<h3 class="text-lg font-medium leading-6 text-gray-200">{{ __('Bitcoin Event') }}</h3>
|
<h3 class="text-lg font-medium leading-6 text-gray-200">{{ __('Bitcoin Event') }}</h3>
|
||||||
<div class="flex flex-row space-x-2 items-center">
|
<div class="flex flex-row space-x-2 items-center">
|
||||||
@can('delete', $bitcoinEvent)
|
@can('delete', $bitcoinEvent)
|
||||||
<div>
|
|
||||||
@if($bitcoinEvent->id)
|
@if($bitcoinEvent->id)
|
||||||
<x-button negative wire:click="deleteMe">
|
<div x-data>
|
||||||
|
<x-button
|
||||||
|
x-on:click="$wireui.confirmDialog({
|
||||||
|
icon: 'warning',
|
||||||
|
title: '{{ __('Are you sure you want to delete this Bitcoin event?') }}',
|
||||||
|
accept: {label: '{{ __('Yes') }}',
|
||||||
|
execute: () => $wire.deleteMe()},
|
||||||
|
reject: {label: '{{ __('No, cancel') }}'},
|
||||||
|
})"
|
||||||
|
negative>
|
||||||
<i class="fa fa-thin fa-trash"></i>
|
<i class="fa fa-thin fa-trash"></i>
|
||||||
{{ __('Delete') }}
|
{{ __('Delete') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
<div>
|
<div>
|
||||||
<x-button :href="$fromUrl">
|
<x-button :href="$fromUrl">
|
||||||
|
|||||||
Reference in New Issue
Block a user