main
Ilham Wara Nugroho 2026-07-16 10:16:25 +07:00
parent 1322aa4b0a
commit 89167a425e
1 changed files with 16 additions and 0 deletions

View File

@ -439,6 +439,22 @@
@endsection
@section('page-js')
<script type="text/javascript">
$(document).on('change', '.uncheckall', function () {
if ($(this).is(':checked')) {
// uncheck semua checkbox KECUALI checkbox terakhir ini
$('.checklistInput').not(this).prop('checked', false);
$('.file-item').addClass('d-none');
$('.file-itemInput').removeClass('is-required');
}
});
$(document).on('change', '.checklistInput:not(.uncheckall)', function () {
if ($(this).is(':checked')) {
// kalau checkbox biasa dicentang, pastikan checkbox uncheckall mati
$('.uncheckall').prop('checked', false);
}
});
$('.clickModal').on('click',function(){
$('.remove').remove();
const fileType = $(this).data('type');