fix projects

This commit is contained in:
2024-11-11 03:16:51 +01:00
parent 9fa897be57
commit 4870717c07
3 changed files with 53 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
document
.getElementById('project-upload')
.addEventListener('submit', function (event) {
const fileInput = document.getElementById('files');
if (fileInput.files.length === 0) {
fileInput.removeAttribute('name');
}
});

View File

@@ -37,4 +37,5 @@
<button type="submit" class="p-2 text-gray-900 bg-yellow-500 rounded-sm shadow hover:bg-yellow-600">Submit</button>
</form>
<script src="/static/js/project-upload.js" defer></script>
{% endblock content%}