pixelfed/resources/views/admin/users/delete.blade.php

74 lines
2.7 KiB
PHP

@extends('admin.partial.template-full')
@section('section')
<div class="title d-flex justify-content-between align-items-center">
<span><a href="/i/admin/users/show/{{$user->id}}" class="btn btn-outline-secondary btn-sm font-weight-bold">Back</a></span>
<span class="text-center">
<h3 class="font-weight-bold mb-0">&commat;{{$profile->username}}</h3>
<p class="mb-0 small text-muted text-uppercase font-weight-bold">
<span>{{$profile->statuses()->count()}} Posts</span>
<span class="px-1">|</span>
<span>{{$profile->followers()->count()}} Followers</span>
<span class="px-1">|</span>
<span>{{$profile->following()->count()}} Following</span>
</p>
</span>
<span>
<div class="dropdown">
<button class="btn btn-outline-secondary btn-sm font-weight-bold dropdown-toggle" type="button" id="userActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-bars"></i></button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userActions">
<a class="dropdown-item" href="/i/admin/users/show/{{$user->id}}">
<span class="font-weight-bold">Overview</span>
</a>
<a class="dropdown-item" href="/i/admin/users/activity/{{$user->id}}">
<span class="font-weight-bold">Activity</span>
</a>
<a class="dropdown-item" href="/i/admin/users/message/{{$user->id}}">
<span class="font-weight-bold">Send Message</span>
</a>
<a class="dropdown-item" href="{{$profile->url()}}">
<span class="font-weight-bold">View Profile</span>
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/i/admin/users/edit/{{$user->id}}">
<span class="font-weight-bold">Edit</span>
</a>
<a class="dropdown-item" href="/i/admin/users/modtools/{{$user->id}}">
<span class="font-weight-bold">Mod Tools</span>
</a>
<a class="dropdown-item" href="/i/admin/users/modlogs/{{$user->id}}">
<span class="font-weight-bold">Mod Logs</span>
</a>
</div>
</div>
</span>
</div>
<hr>
<div class="row">
<div class="col-12 col-md-8 offset-md-2">
<div class="card card-body">
<p class="lead text-center py-5">Are you sure you want to delete this account?</p>
<p class="mb-0">
<form method="post" id="deleteForm">
@csrf
<button type="button" id="confirmDelete" class="btn btn-danger btn-block font-weight-bold">DELETE ACCOUNT</button>
</form>
</p>
</div>
</div>
</div>
@endsection
@push('scripts')
<script type="text/javascript">
$('#confirmDelete').click(function(e) {
e.preventDefault();
if(window.confirm('Are you sure you want to delete this account?') == true) {
if(window.confirm('Are you absolutely sure you want to delete this account?') == true) {
$('#deleteForm').submit();
}
}
})
</script>
@endpush