forked from rDrama/rDrama
1
0
Fork 0
Aevann 2024-02-29 23:52:35 +02:00
parent eb1fe8bc03
commit 3243c58985
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,7 @@
function contact(form) {
sendFormXHR(form,
() => {
document.getElementById('input-message').value = null;
}
)
}

View File

@ -3,7 +3,7 @@
{% block content %}
<h1 class="article-title">Contact {{SITE_NAME}} Admins</h1>
{% if v %}
<form id="contactform" action="/contact" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<form id="contactform" action="/contact" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="contact(this)">
<label for="input-message" class="mt-3">Your message</label>
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="file-ta form-control" required></textarea>
@ -24,4 +24,6 @@
{% else %}
<h4>by email: {{EMAIL}}</h4>
{% endif %}
<script defer src="{{'js/contact.js' | asset}}"></script>
{% endblock %}