remove email from admins contact form
This commit is contained in:
parent
0889d71647
commit
37396d42b5
2 changed files with 1 additions and 10 deletions
|
@ -295,14 +295,11 @@ def contact(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def submit_contact(v):
|
def submit_contact(v):
|
||||||
body = request.values.get("message")
|
body = request.values.get("message")
|
||||||
email = request.values.get("email")
|
|
||||||
if not body: abort(400)
|
if not body: abort(400)
|
||||||
if not email: email = None
|
|
||||||
|
|
||||||
header = "This message has been sent automatically to all admins via [/contact](/contact)\n"
|
header = "This message has been sent automatically to all admins via [/contact](/contact)\n"
|
||||||
email = f"<strong>Email</strong>: {email}\n"
|
|
||||||
message = f"<strong>Message</strong>:\n{body}\n\n"
|
message = f"<strong>Message</strong>:\n{body}\n\n"
|
||||||
html = sanitize(f"{header}\n{email}\n{message}")
|
html = sanitize(f"{header}\n{message}")
|
||||||
|
|
||||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||||
file=request.files["file"]
|
file=request.files["file"]
|
||||||
|
|
|
@ -23,12 +23,6 @@
|
||||||
|
|
||||||
<p>Use this form to contact {{SITE_TITLE}} Admins.</p>
|
<p>Use this form to contact {{SITE_TITLE}} Admins.</p>
|
||||||
<form id="contactform" action="/send_admin" method="post" enctype="multipart/form-data">
|
<form id="contactform" action="/send_admin" method="post" enctype="multipart/form-data">
|
||||||
<label class="mt-3">Your Email</label>
|
|
||||||
{% if v and v.email %}
|
|
||||||
<input autocomplete="off" class="form-control" name="email" value="{{v.email}}" placeholder="(optional)">
|
|
||||||
{% else %}
|
|
||||||
<input autocomplete="off" class="form-control" name="email" value="" placeholder="(optional)">
|
|
||||||
{% endif %}
|
|
||||||
<label for="input-message" class="mt-3">Your message</label>
|
<label for="input-message" class="mt-3">Your message</label>
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input 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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue