Skip to content

Commit

Permalink
limit evidence input types
Browse files Browse the repository at this point in the history
  • Loading branch information
fershad committed Dec 24, 2024
1 parent 6274132 commit 7b648b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/accounts/templates/provider_registration/evidence.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,16 @@ <h1>Submit your evidence</h1>

</form>
{% endblock %}


<script>
// A workaround to limit the file input types to PDF and images.
function limitFileInputType() {
const fileInputs = document.querySelectorAll('input[type="file"]');
fileInputs.forEach((fileInput) => {
fileInput.accept = 'application/pdf, image/*';
});
}

window.addEventListener('load', limitFileInputType);
</script>

0 comments on commit 7b648b6

Please sign in to comment.