delete.blade.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @extends('admin.partial.template-full')
  2. @section('section')
  3. <div class="title d-flex justify-content-between align-items-center">
  4. <span><a href="/i/admin/users/show/{{$user->id}}" class="btn btn-outline-secondary btn-sm font-weight-bold">Back</a></span>
  5. <span class="text-center">
  6. <h3 class="font-weight-bold mb-0">&commat;{{$profile->username}}</h3>
  7. <p class="mb-0 small text-muted text-uppercase font-weight-bold">
  8. <span>{{$profile->statuses()->count()}} Posts</span>
  9. <span class="px-1">|</span>
  10. <span>{{$profile->followers()->count()}} Followers</span>
  11. <span class="px-1">|</span>
  12. <span>{{$profile->following()->count()}} Following</span>
  13. </p>
  14. </span>
  15. <span>
  16. <div class="dropdown">
  17. <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>
  18. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userActions">
  19. <a class="dropdown-item" href="/i/admin/users/show/{{$user->id}}">
  20. <span class="font-weight-bold">Overview</span>
  21. </a>
  22. <a class="dropdown-item" href="/i/admin/users/activity/{{$user->id}}">
  23. <span class="font-weight-bold">Activity</span>
  24. </a>
  25. <a class="dropdown-item" href="/i/admin/users/message/{{$user->id}}">
  26. <span class="font-weight-bold">Send Message</span>
  27. </a>
  28. <a class="dropdown-item" href="{{$profile->url()}}">
  29. <span class="font-weight-bold">View Profile</span>
  30. </a>
  31. <div class="dropdown-divider"></div>
  32. <a class="dropdown-item" href="/i/admin/users/edit/{{$user->id}}">
  33. <span class="font-weight-bold">Edit</span>
  34. </a>
  35. <a class="dropdown-item" href="/i/admin/users/modtools/{{$user->id}}">
  36. <span class="font-weight-bold">Mod Tools</span>
  37. </a>
  38. <a class="dropdown-item" href="/i/admin/users/modlogs/{{$user->id}}">
  39. <span class="font-weight-bold">Mod Logs</span>
  40. </a>
  41. </div>
  42. </div>
  43. </span>
  44. </div>
  45. <hr>
  46. <div class="row">
  47. <div class="col-12 col-md-8 offset-md-2">
  48. <div class="card card-body">
  49. <p class="lead text-center py-5">Are you sure you want to delete this account?</p>
  50. <p class="mb-0">
  51. <form method="post" id="deleteForm">
  52. @csrf
  53. <button type="button" id="confirmDelete" class="btn btn-danger btn-block font-weight-bold">DELETE ACCOUNT</button>
  54. </form>
  55. </p>
  56. </div>
  57. </div>
  58. </div>
  59. @endsection
  60. @push('scripts')
  61. <script type="text/javascript">
  62. $('#confirmDelete').click(function(e) {
  63. e.preventDefault();
  64. if(window.confirm('Are you sure you want to delete this account?') == true) {
  65. if(window.confirm('Are you absolutely sure you want to delete this account?') == true) {
  66. $('#deleteForm').submit();
  67. }
  68. }
  69. })
  70. </script>
  71. @endpush