Skip to content
Snippets Groups Projects
Commit 44c0e79c authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Fix and simplify code that depended on jQuery

parent 7993a48c
No related branches found
No related tags found
No related merge requests found
...@@ -61,13 +61,8 @@ ...@@ -61,13 +61,8 @@
{% endblock content -%} {% endblock content -%}
{% block postload %} {% block postload %}
<script> <script>
$('body').on('change', '#file-input', function () { document.getElementById('file-input').addEventListener('change', function () {
var files = this.files; document.getElementById('show-file').innerHTML = this.files.item(0).name;
var fileNames = [];
for (var i = 0; i < files.length; i++) {
fileNames.push(files.item(i).name);
}
$('#show-file').html(fileNames.join(", "));
}); });
</script> </script>
{% endblock postload %} {% endblock postload %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment