contact form JS separation

This commit is contained in:
2025-05-28 09:53:57 +02:00
parent 437a054d3b
commit e20af39e83
2 changed files with 11 additions and 12 deletions

View File

@@ -157,16 +157,5 @@
</div>
</div>
<script>
function previewAvatar(event) {
const [file] = event.target.files;
if (file) {
const reader = new FileReader();
reader.onload = function(e) {
document.getElementById('avatarPreview').src = e.target.result;
};
reader.readAsDataURL(file);
}
}
</script>
<script src="{{ url_for('static', filename='js/avatar-preview.js') }}"></script>
{% endblock %}