mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
Update Laravel to 7.0
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
<p class="my-auto ml-3">N'utilise pas un horaire</p>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<div style="height: 2.7rem;overflow: hidden">
|
||||
{!! $event_type->admin_desc !!}
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<div class="col-md-4 text-right">
|
||||
@if($event_type->id != 1)
|
||||
<button class="btn btn-danger btn-just-icon">
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteEventType({{$event_type->id}})">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
@else
|
||||
@@ -107,6 +107,9 @@
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="col-12 text-right">
|
||||
<a class="btn btn-primary" href="/admin/config/instruction/event_type/create">Ajouter un type d'évenement</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,5 +149,45 @@
|
||||
},
|
||||
date: new Date(end)
|
||||
});
|
||||
|
||||
function deleteEventType(id)
|
||||
{
|
||||
Swal.fire({
|
||||
title: 'Êtes vous certain ?',
|
||||
text: "Vous ne pourrez annuler cette action",
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Oui',
|
||||
cancelButtonText: 'Non'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
let request = $.ajax({
|
||||
url: "/api/eventType/"+id,
|
||||
method: "DELETE",
|
||||
data: { api_token : api_token },
|
||||
dataType: "html"
|
||||
});
|
||||
request.done(function (msg) {
|
||||
Swal.fire(
|
||||
'Supprimé!',
|
||||
'Le type d\'évenement a été supprimé',
|
||||
'success'
|
||||
).then(() => {
|
||||
window.location.href = '/admin/config/instruction';
|
||||
});
|
||||
});
|
||||
request.fail(function (jqXHR, textStatus) {
|
||||
Swal.fire({
|
||||
type: 'error',
|
||||
title: 'Oops...',
|
||||
text: 'Le type d\'évenement n\'a pas pus être supprimé',
|
||||
footer: '<small>'+textStatus+'</small>'
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user