Skip to content
Snippets Groups Projects
Unverified Commit 850f50f5 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Enhance the SAML response post page.

Make it a bit better for those with javascript disabled, and add a CSP.
parent ea0ce613
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" {# -#}
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'unsafe-inline'"/>
<link rel="icon" href="/{{ baseurlpath }}resources/icons/favicon.ico">
<title>{% trans %}Sending message{% endtrans %}</title>
<script src="/{{ baseurlpath }}resources/post.js"></script>
<link rel="stylesheet" href="/{{ baseurlpath }}resources/post.css">
</head>
<body>
</head>
<body>
<form method="post" action="{{ destination }}">
{#- We need to add this element and call the click method, because calling submit() on the form causes failed
submissions if the form has another element with name or id of submit. See:
https://developer.mozilla.org/en/DOM/form.submit#Specification
#}
<noscript>
<p><strong>Note:</strong>
Since your browser does not support JavaScript,
you must press the button below once to proceed.</p>
</noscript>
<input type="submit" id="postLoginSubmitButton" style="display: none"/>
{%- for name, value in post %}
{%- if value is iterable %}
{%- for index, item in value %}
<form method="post" action="{{ destination }}">
<!-- Need to add this element and call click method, because calling
submit() on the form causes failed submission if the form has another
element with name or id of submit.
See: https://developer.mozilla.org/en/DOM/form.submit#Specification -->
<input type="submit" id="postLoginSubmitButton">
<input type="hidden" name="{{ name }}[{{ index }}]" value="{{ value }}"/>
{%- endfor %}
{%- else %}
{% for name, value in post %}
{% if value is iterable %}
{% for index, item in value %}
<input type="hidden" name="{{ name }}[{{ index }}]" value = "{{ value }}">
{% endfor %}
{% else %}
<input type="hidden" name="{{ name }}" value = "{{ value }}">
{% endif %}
{% endfor %}
<input type="hidden" name="{{ name }}" value="{{ value }}"/>
{%- endif %}
{%- endfor %}
<noscript>
<button type="submit" class="btn">Continue</button>
</noscript>
<noscript>
<h2>{% trans %}Warning{% endtrans %}</h2>
<p>{% trans %}Since your browser does not support Javascript, you must press the button below to proceed.{%
endtrans %}</p>
<button type="submit">{% trans %}Yes, continue{% endtrans %}</button>
</noscript>
</form>
</body>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment