delete-user-form.blade.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <section class="space-y-6">
  2. <header>
  3. <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
  4. {{ __('Delete Account') }}
  5. </h2>
  6. <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
  7. {{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}
  8. </p>
  9. </header>
  10. <x-danger-button
  11. x-data=""
  12. x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
  13. >{{ __('Delete Account') }}</x-danger-button>
  14. <x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
  15. <form method="post" action="{{ route('profile.destroy') }}" class="p-6">
  16. @csrf
  17. @method('delete')
  18. <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
  19. {{ __('Are you sure you want to delete your account?') }}
  20. </h2>
  21. <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
  22. {{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
  23. </p>
  24. <div class="mt-6">
  25. <x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
  26. <x-text-input
  27. id="password"
  28. name="password"
  29. type="password"
  30. class="mt-1 block w-3/4"
  31. placeholder="{{ __('Password') }}"
  32. />
  33. <x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
  34. </div>
  35. <div class="mt-6 flex justify-end">
  36. <x-secondary-button x-on:click="$dispatch('close')">
  37. {{ __('Cancel') }}
  38. </x-secondary-button>
  39. <x-danger-button class="ms-3">
  40. {{ __('Delete Account') }}
  41. </x-danger-button>
  42. </div>
  43. </form>
  44. </x-modal>
  45. </section>