68 lines
2.9 KiB
PHP
68 lines
2.9 KiB
PHP
<section class="space-y-6">
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
{{ __('Hapus Akun') }}
|
|
</h2>
|
|
|
|
<p class="mt-1 text-sm text-gray-600">
|
|
{{ __('Setelah akun Anda dihapus, semua sumber daya dan data akan dihapus secara permanen. Silakan unduh data atau informasi apa pun yang ingin Anda pertahankan sebelum menghapus akun Anda.') }}
|
|
</p>
|
|
</header>
|
|
|
|
<x-danger-button
|
|
x-data=""
|
|
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
|
|
>{{ __('Hapus Akun') }}</x-danger-button>
|
|
|
|
<x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
|
|
<form method="post" action="{{ route('profile.destroy') }}" class="p-6">
|
|
@csrf
|
|
@method('delete')
|
|
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
{{ __('Apakah Anda yakin ingin menghapus akun Anda?') }}
|
|
</h2>
|
|
|
|
<p class="mt-1 text-sm text-gray-600">
|
|
{{ __('Setelah akun Anda dihapus, semua sumber daya dan data akan dihapus secara permanen. Silakan masukkan password Anda untuk mengonfirmasi bahwa Anda ingin menghapus akun Anda secara permanen.') }}
|
|
</p>
|
|
|
|
<div class="mt-6">
|
|
<x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
|
|
|
|
<div style="position: relative; display: flex; align-items: center; max-width: 75%;\">\n <input
|
|
id="password"
|
|
name="password"
|
|
type="password"
|
|
class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500\"
|
|
placeholder="{{ __('Password') }}"
|
|
style="padding-right: 45px;" />
|
|
<button type="button\" style="position: absolute; right: 12px; background: none; border: none; cursor: pointer; color: #5B7B89; font-size: 18px;\" onclick="togglePasswordVisibility('password', this)\">👁️</button>
|
|
</div>
|
|
|
|
<x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
|
|
</div>
|
|
|
|
<div class="mt-6 flex justify-end">
|
|
<x-secondary-button x-on:click="$dispatch('close')">
|
|
{{ __('Batal') }}
|
|
</x-secondary-button>
|
|
|
|
<x-danger-button class="ms-3">
|
|
{{ __('Hapus Akun') }}
|
|
</x-danger-button>
|
|
</div>
|
|
</form>
|
|
</x-modal>
|
|
</section>
|
|
|
|
@push('scripts')
|
|
<script>
|
|
function togglePasswordVisibility(inputId, buttonElement) {
|
|
const input = document.getElementById(inputId);
|
|
const isPassword = input.type === 'password';
|
|
input.type = isPassword ? 'text' : 'password';
|
|
}
|
|
</script>
|
|
@endpush
|