main
Ilham Wara Nugroho 2026-02-04 15:06:29 +07:00
parent 6ba3881b7b
commit 2b67edc671
1 changed files with 16 additions and 10 deletions

View File

@ -84,7 +84,7 @@
</ul>
</div>
@endif
<form method="POST" id="form">
<form method="POST" id="form" enctype="multipart/form-data">
<input type="hidden" name="secure_id" value="{{encode_id($kuesioner->KuesionerId)}}">
{{csrf_field()}}
<div class="">
@ -378,15 +378,9 @@
// $('input[type="checkbox"], input[type="radio"], input[type="text"], textarea').attr('disabled', true);
});
@endif
$('.page').on('click',function(e){
e.preventDefault();
let number = $(this).data('number');
function getForm(number){
let base_url = "{{url('/')}}";
// Tambahkan kelas active dan hapus dari yang lain
$('.page').removeClass('bg-primary-light border-primary text-primary');
$(this).addClass('bg-primary-light border-primary text-primary');
$.ajax({
$.ajax({
url: base_url+'/getForm', // Ganti dengan URL API-mu
type: 'POST', // Bisa juga 'POST' kalau perlu
xhrFields: {
@ -441,7 +435,17 @@
complete: function () {
$('#loading-spinner').hide(); // Sembunyikan spinner setelah request selesai
}
});
});
}
$('.page').on('click',function(e){
e.preventDefault();
let number = $(this).data('number');
let base_url = "{{url('/')}}";
// Tambahkan kelas active dan hapus dari yang lain
$('.page').removeClass('bg-primary-light border-primary text-primary');
$(this).addClass('bg-primary-light border-primary text-primary');
getForm(number);
});
$('.resume').on('click',function(e){
@ -647,6 +651,8 @@
$('.nilai_provinsi').html(response.nilai_prov);
$('.page').closest('.bg-primary-light').addClass('bg-success-light border-success text-success');
$('.page').closest('.bg-primary-light').removeClass('bg-primary-light border-primary border-secondary text-primary');
getForm(response.page_number);
},
error: function (xhr) {
toastr.error(