update
parent
410fffdea7
commit
a15a3bc432
|
@ -795,7 +795,7 @@ if (!function_exists('formKriteria')) {
|
||||||
$key = 'number_'.$keyKriteria.'_'.$keyOption;
|
$key = 'number_'.$keyKriteria.'_'.$keyOption;
|
||||||
|
|
||||||
$html .= '<div class="custom-control custom-checkbox m-2">';
|
$html .= '<div class="custom-control custom-checkbox m-2">';
|
||||||
$html .= '<input type="checkbox" '.@$checked.' class="custom-control-input is-required" id="'.$key.'" value="'.$dataOption.'" name="input_'.$data->key.'[]">';
|
$html .= '<input type="checkbox" '.(@$value == $dataOption ? 'checked' : (@$valueOld == $dataOption ? 'checked' : '') ).' class="custom-control-input is-required" id="'.$key.'" value="'.$dataOption.'" name="input_'.$data->key.'[]">';
|
||||||
$html .= '<label class="custom-control-label" for="'.$key.'">'.$dataOption.'</label>';
|
$html .= '<label class="custom-control-label" for="'.$key.'">'.$dataOption.'</label>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,7 +349,7 @@
|
||||||
$('.removeFormKriteria').remove();
|
$('.removeFormKriteria').remove();
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
console.log('Response:', response);
|
// console.log('Response:', response);
|
||||||
$('.changeForm').append(response.data);
|
$('.changeForm').append(response.data);
|
||||||
$('.changeTitle').html(response.title);
|
$('.changeTitle').html(response.title);
|
||||||
$('.nilai_sekolah').html(response.nilai_sekolah);
|
$('.nilai_sekolah').html(response.nilai_sekolah);
|
||||||
|
@ -518,10 +518,12 @@
|
||||||
if ($(`input[name="${name}"]:checked`).length === 0) {
|
if ($(`input[name="${name}"]:checked`).length === 0) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
$(`input[name="${name}"]`).closest('.custom-control-input').addClass("is-invalid");
|
$(`input[name="${name}"]`).closest('.custom-control-input').addClass("is-invalid");
|
||||||
}else if ($(`input[name="${name}"]:checked`).length === 0) {
|
}
|
||||||
isMultiple = false;
|
/* else if ($(`input[name="${name}"]:checked`).length === 0) {
|
||||||
$(`input[name="${name}"]`).closest('.custom-control-input').addClass("is-invalid");
|
isMultiple = false;
|
||||||
} else {
|
$(`input[name="${name}"]`).closest('.custom-control-input').addClass("is-invalid");
|
||||||
|
} */
|
||||||
|
else {
|
||||||
$(`input[name="${name}"]`).closest('.custom-control-input').removeClass("is-invalid");
|
$(`input[name="${name}"]`).closest('.custom-control-input').removeClass("is-invalid");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue