Simplify inline scripts for easier CSP

This commit is contained in:
Pēteris Caune 2018-11-12 10:37:31 +02:00
parent 472c6424e9
commit 8ad3b0d537
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 4 additions and 8 deletions

View File

@ -8,10 +8,8 @@
</head> </head>
<body> <body>
<form id="form-auto" method="post">{% csrf_token %}</form> <form id="form" method="post">{% csrf_token %}</form>
<script> <script>document.getElementById("form").submit();</script>
document.getElementById("form-auto").submit();
</script>
<style> <style>
body { body {
@ -45,7 +43,7 @@
<p>You are about to log into {% site_name %}.</p> <p>You are about to log into {% site_name %}.</p>
<p>Please press the button below to continue:</p> <p>Please press the button below to continue:</p>
<br /> <br />
<form id="form" method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
<input <input
id="submit-btn" id="submit-btn"

View File

@ -14,7 +14,5 @@
value="Unsubscribe"> value="Unsubscribe">
</form> </form>
<script> <script>document.getElementById("form").submit();</script>
document.getElementById("form").submit();
</script>
{% endblock %} {% endblock %}