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