main
Ilham Wara Nugroho 2025-09-11 15:50:31 +07:00
parent 9baa7e29ab
commit d05cb90d04
1 changed files with 19 additions and 19 deletions

View File

@ -187,30 +187,30 @@
return false; return false;
}); });
$(document).ready(function() { $(document).ready(function() {
$('.numberInput').on('input', function() { $('.numberInput').on('input', function() {
this.value = this.value.replace(/[^0-9]/g, ''); // Hanya angka 0-9 this.value = this.value.replace(/[^0-9]/g, ''); // Hanya angka 0-9
}); });
$('#togglePassword').on('click', function() { $('#togglePassword').on('click', function() {
let passwordField = $('#password'); let passwordField = $('#password');
let icon = $(this).find('i'); let icon = $(this).find('i');
// Cek apakah input saat ini bertipe password // Cek apakah input saat ini bertipe password
if (passwordField.attr('type') === 'password') { if (passwordField.attr('type') === 'password') {
passwordField.attr('type', 'text'); // Ubah ke teks passwordField.attr('type', 'text'); // Ubah ke teks
icon.removeClass('fa-eye').addClass('fa-eye-slash'); // Ganti ikon icon.removeClass('fa-eye').addClass('fa-eye-slash'); // Ganti ikon
} else { } else {
passwordField.attr('type', 'password'); // Ubah ke password passwordField.attr('type', 'password'); // Ubah ke password
icon.removeClass('fa-eye-slash').addClass('fa-eye'); // Kembalikan ikon icon.removeClass('fa-eye-slash').addClass('fa-eye'); // Kembalikan ikon
} }
}); });
}); });
const myDropzone = new Dropzone(".dropzone", { const myDropzone = new Dropzone(".dropzone", {
url: "{{ url('uploadTempImage') }}", // URL ke controller kamu url: "{{ url('uploadTempImage') }}", // URL ke controller kamu
method: "POST", method: "POST",
xhrFields: { // xhrFields: {
withCredentials: true // withCredentials: true
}, // },
headers: { headers: {
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'), 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest'