mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-19 00:07:17 +01:00
Use file-input-change event to disable/enable conversionType
This commit is contained in:
parent
e273b9a3ad
commit
64ee26facf
@ -51,15 +51,11 @@
|
||||
<br>
|
||||
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{imageToPDF.submit}"></button>
|
||||
<script>
|
||||
$('#fileInput-input').on('change', function() {
|
||||
$('#fileInput-input').on('file-input-change', () => {
|
||||
var files = document.getElementById("fileInput-input").files;
|
||||
var conversionType = document.getElementById("conversionType");
|
||||
console.log("files.length=" + files.length)
|
||||
if (files.length > 1) {
|
||||
conversionType.disabled = false;
|
||||
} else {
|
||||
conversionType.disabled = true;
|
||||
}
|
||||
conversionType.disabled = files.length <= 1;
|
||||
});
|
||||
|
||||
$('#conversionType').change(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user