Skip to content

Commit 72d3228

Browse files
WIP adjusting upload for batch deletion
1 parent 7ff9a0f commit 72d3228

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

static/scripts/batch-deletion/batch-deletion-upload.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,21 @@ $(document).ready(() => {
8585
});
8686
$addDeletionModal.appendTo('body').modal('show');
8787
resetFormFields();
88-
})
88+
});
8989

9090
document.querySelector('#batch-file-input').addEventListener('change', loadCsvFile);
91-
})
9291

92+
$(document).on('click', '.add-modal--upload .btn-submit', (e) => {
93+
$('#batch-upload-spinner').show();
94+
95+
if (!$('#batch-file-data').val()) {
96+
$.showNotification('Bitte eine gültige CSV-Datei auswählen', 'danger', true);
97+
return;
98+
}
99+
100+
const $submitBtn = $(e.currentTarget);
101+
setTimeout(() => {
102+
$submitBtn.prop('disabled', true);
103+
}, 0);
104+
});
105+
});

0 commit comments

Comments
 (0)