master
Aevann1 2022-01-06 23:38:54 +02:00
parent de30fd53c7
commit 2c0b81297d
2 changed files with 3 additions and 2 deletions

View File

@ -261,7 +261,7 @@ def contact(v):
else: template = 'CHRISTMAS/' else: template = 'CHRISTMAS/'
return render_template(f"{template}contact.html", v=v) return render_template(f"{template}contact.html", v=v)
@app.post("/contact") @app.post("/send_admin")
@limiter.limit("1/second") @limiter.limit("1/second")
@auth_required @auth_required
@validate_formkey @validate_formkey

View File

@ -26,9 +26,10 @@
<label class="mt-3">Your Email</label> <label class="mt-3">Your Email</label>
<input autocomplete="off" class="form-control" value="{{v.email}}" readonly="readonly" disabled> <input autocomplete="off" class="form-control" value="{{v.email}}" readonly="readonly" disabled>
<form id="contactform" action="/contact" method="post"> <form id="contactform" action="/send_admin" method="post">
<label for="input-message" class="mt-3">Your message</label> <label for="input-message" class="mt-3">Your message</label>
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="form-control" required></textarea> <textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="form-control" required></textarea>
<input autocomplete="off" type="submit" value="Submit" class="btn btn-primary mt-3"> <input autocomplete="off" type="submit" value="Submit" class="btn btn-primary mt-3">