Skip to content

Commit

Permalink
Remove JQuery from achievement image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumos committed Sep 10, 2024
1 parent 861e68f commit 8cf8091
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions resources/views/pages/achievements/partials/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,3 @@
</small>
</div>
<button type="submit" class="btn btn-primary">@lang('title.submit')</button>

<script>
window.addEventListener('load', function() {
// Show selected files in file input label
$("input[type=file]").change(function () {
var files = $(this).prop("files");
var fieldVal = $.map(files, function(val) { return ' ' + val.name; });
if (fieldVal != undefined || fieldVal != "") {
$(this).next(".custom-file-label").text(fieldVal);
}
});
})
</script>

0 comments on commit 8cf8091

Please sign in to comment.