core: add separate autosubmit form for use without flows
This commit is contained in:
parent
1675dab314
commit
a943d060d2
|
@ -0,0 +1,34 @@
|
||||||
|
{% extends "login/base_full.html" %}
|
||||||
|
|
||||||
|
{% load passbook_utils %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ title }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block card %}
|
||||||
|
<form method="POST" action="{{ url }}" autosubmit>
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for key, value in attrs.items %}
|
||||||
|
<input type="hidden" name="{{ key }}" value="{{ value }}">
|
||||||
|
{% endfor %}
|
||||||
|
<div class="pf-c-form__group pf-u-display-flex pf-u-justify-content-center">
|
||||||
|
<div class="pf-c-form__group-control">
|
||||||
|
<span class="pf-c-spinner" role="progressbar" aria-valuetext="Loading...">
|
||||||
|
<span class="pf-c-spinner__clipper"></span>
|
||||||
|
<span class="pf-c-spinner__lead-ball"></span>
|
||||||
|
<span class="pf-c-spinner__tail-ball"></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pf-c-form__group pf-m-action">
|
||||||
|
<div class="pf-c-form__actions">
|
||||||
|
<button class="pf-c-button pf-m-primary pf-m-block" type="submit">{% trans 'Continue' %}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
document.querySelector("form").submit();
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
|
@ -53,7 +53,7 @@ class InitiateView(View):
|
||||||
if source.binding_type == SAMLBindingTypes.POST_AUTO:
|
if source.binding_type == SAMLBindingTypes.POST_AUTO:
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
"generic/autosubmit_form.html",
|
"generic/autosubmit_form_full.html",
|
||||||
{
|
{
|
||||||
"title": _("Redirecting to %(app)s..." % {"app": source.name}),
|
"title": _("Redirecting to %(app)s..." % {"app": source.name}),
|
||||||
"attrs": {"SAMLRequest": saml_request, "RelayState": relay_state},
|
"attrs": {"SAMLRequest": saml_request, "RelayState": relay_state},
|
||||||
|
|
Reference in New Issue