ui: fix application grid icons, fix SAML Authorize

This commit is contained in:
Jens Langhammer 2020-02-21 22:16:58 +01:00
parent 2f51f354de
commit 8dbbe9102b
3 changed files with 18 additions and 15 deletions

View File

@ -24,7 +24,7 @@
{% if applications %}
<div class="pf-l-gallery pf-m-gutter">
{% for app in applications %}
<a href="{{ app.launch_url }}" class="pf-c-card pf-m-hoverable pf-m-compact" id="card-1">
<a href="{{ app.meta_launch_url }}" class="pf-c-card pf-m-hoverable pf-m-compact" id="card-1">
<div class="pf-c-card__head">
{% if not app.meta_icon_url %}
<i class="pf-icon pf-icon-arrow"></i>
@ -35,10 +35,10 @@
<div class="pf-c-card__header pf-c-title pf-m-md">
<p id="card-1-check-label">{{ app.name }}</p>
<div class="pf-c-content">
<small>{{ app.subtitle }}</small>
<small>{{ app.meta_publisher }}</small>
</div>
</div>
<div class="pf-c-card__body">{% trans app.description %}</div>
<div class="pf-c-card__body">{% trans app.meta_description %}</div>
</a>
{% endfor %}
</div>

View File

@ -3,20 +3,13 @@
{% load utils %}
{% load i18n %}
{% block title %}
{% title 'Authorize Application' %}
{% endblock %}
{% block card %}
<header class="login-pf-header">
<h1>{% trans 'Authorize Application' %}</h1>
</header>
<form method="POST" action="{{ saml_params.acs_url }}">
<form method="POST" class="pf-c-form" action="{{ saml_params.acs_url }}">
{% csrf_token %}
<input type="hidden" name="ACSUrl" value="{{ saml_params.acs_url }}">
<input type="hidden" name="RelayState" value="{{ saml_params.relay_state }}" />
<input type="hidden" name="SAMLResponse" value="{{ saml_params.saml_response }}" />
<div class="login-group">
<div class="pf-c-form__group">
<h3>
{% blocktrans with provider=provider.application.name %}
You're about to sign into {{ provider }}
@ -28,7 +21,9 @@
{% endblocktrans %}
<a href="{% url 'passbook_core:auth-logout' %}">{% trans 'Not you?' %}</a>
</p>
<input class="btn btn-primary btn-block btn-lg" type="submit" value="{% trans 'Continue' %}" />
</div>
<div class="pf-c-form__group pf-m-action">
<input class="pf-c-button pf-m-primary pf-m-block" type="submit" value="{% trans 'Continue' %}" />
</div>
</form>
{% endblock %}

View File

@ -139,7 +139,11 @@ class LoginProcessView(AccessRequiredView):
return render(
request,
"saml/idp/login.html",
{"saml_params": params, "provider": self.provider,},
{
"saml_params": params,
"provider": self.provider,
"title": "Authorize Application",
},
)
except exceptions.CannotHandleAssertion as exc:
@ -300,5 +304,9 @@ class InitiateLoginView(AccessRequiredView):
return render(
request,
"saml/idp/login.html",
{"saml_params": params, "provider": self.provider,},
{
"saml_params": params,
"provider": self.provider,
"title": "Authorize Application",
},
)