mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Submit automatiquement le form
This commit is contained in:
parent
f3b10eb1e6
commit
63e662c821
@ -14,10 +14,10 @@
|
||||
<div class="px-4 py-5 my-5 text-center">
|
||||
<h1 class="display-5 fw-bold"><i class="bi bi-vector-pen"></i> Signer un PDF</h1>
|
||||
<div class="col-lg-3 mx-auto">
|
||||
<form action="/upload" method="POST" class="row g-3" enctype="multipart/form-data">
|
||||
<form id="form_pdf_upload" action="/upload" method="POST" class="row g-3" enctype="multipart/form-data">
|
||||
<div class="col-12">
|
||||
<label for="formFileLg" class="form-label">Choisir un PDF</label>
|
||||
<input class="form-control form-control-lg" name="pdf" type="file">
|
||||
<input id="input_pdf_upload" class="form-control form-control-lg" name="pdf" type="file">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="d-grid gap-2">
|
||||
@ -29,5 +29,10 @@
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('input_pdf_upload').addEventListener('change', function(event) {
|
||||
document.getElementById('form_pdf_upload').submit();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user