1

show file thats choosen to load up

Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
Co-Authored-By: andibuls <andibuls@users.noreply.github.com>
Co-Authored-By: tomvahl <tomvahl@users.noreply.github.com>
This commit is contained in:
Lukas Ettel
2020-03-18 16:55:07 +01:00
parent 4450a091de
commit 1fbfd49781
2 changed files with 22 additions and 0 deletions

View File

@ -6,6 +6,10 @@
<title>Gruppendetails</title>
<th:block th:fragment="headcontent">
<!-- Links, Skripts, Styles hier einfügen! -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</th:block>
</head>
<body>
@ -74,4 +78,11 @@
</div>
</div>
</div>
<script>
// Add the following code if you want the name of the file appear on select
$(".custom-file-input").on("change", function() {
var fileName = $(this).val().split("\\").pop();
$(this).siblings(".custom-file-label").addClass("selected").html(fileName);
});
</script>
</main>