make submit button not submit if comment is not given

This commit is contained in:
csd4ni3l
2025-10-25 14:55:33 +02:00
parent 2850fe4868
commit 1280d805d6

View File

@@ -62,7 +62,7 @@
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" data-bs-dismiss="modal">Submit</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
@@ -95,6 +95,7 @@ document.getElementById('modal-form').addEventListener('submit', function(e) {
method: 'POST',
body: formData
}).then(response => {
bootstrap.Modal.getInstance(document.getElementById('createPostModal')).hide();
location.reload();
})
.catch(error => {