mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
3.2.4
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
@if($rank->id == 1)
|
||||
<button disabled class="btn btn-danger btn-just-icon"><i class="fa fa-close"></i></button>
|
||||
@else
|
||||
<button class="btn btn-danger btn-just-icon"><i class="fa fa-close"></i></button>
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteRanks({{$rank->id}})"><i class="fa fa-close"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,3 +46,43 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script>
|
||||
function deleteRanks(pid){
|
||||
swal({
|
||||
title: 'Êtes vous certain ?',
|
||||
html:
|
||||
'Vous ne pourrez annuler cette action! <br>' +
|
||||
'<strong>Veuillez donner un nouveau grade a tous les utilisateurs posédant présentement le grade que vous voulez supprimer</strong>',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Oui',
|
||||
cancelButtonText: 'Non'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/config/rank/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"Le grade a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user