mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
OpenID Connect RP support for customer accounts
This commit is contained in:
committed by
Raphael Michel
parent
e102a590ab
commit
7f5518dbf6
@@ -50,16 +50,31 @@
|
||||
and access them at any time.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% bootstrap_form login_form layout="checkout" %}
|
||||
{% if request.organizer.settings.customer_accounts_native %}
|
||||
{% bootstrap_form login_form layout="checkout" %}
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<a
|
||||
href="{% abseventurl request.organizer "presale:organizer.customer.resetpw" %}"
|
||||
target="_blank">
|
||||
{% trans "Reset password" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<a
|
||||
href="{% abseventurl request.organizer "presale:organizer.customer.resetpw" %}"
|
||||
target="_blank">
|
||||
{% trans "Reset password" %}
|
||||
</a>
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
{% for provider in request.organizer.sso_providers.all %}
|
||||
{% if provider.is_active %}
|
||||
<a href="{% eventurl request.organizer "presale:organizer.customer.login" provider=provider.pk %}?next={% if request.event_domain %}{{ request.scheme }}://{{ request.get_host }}{% endif %}{{ request.get_full_path|urlencode }}"
|
||||
class="btn btn-primary btn-lg btn-block" data-open-in-popup-window>
|
||||
{{ provider.button_label }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="login-sso-data" id="login_sso_data">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/widget/floatformat.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/questions.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/main.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/sso.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/cookieconsent.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixbase/js/asynctask.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/cart.js" %}"></script>
|
||||
|
||||
@@ -4,6 +4,32 @@
|
||||
{% load escapejson %}
|
||||
<div id="ajaxerr">
|
||||
</div>
|
||||
<div id="popupmodal" hidden aria-live="polite">
|
||||
<div class="modal-card">
|
||||
<div class="modal-card-icon">
|
||||
<i class="fa fa-window-restore big-icon" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="modal-card-content">
|
||||
<div>
|
||||
<h3>
|
||||
{% trans "We've started the requested process in a new window." %}
|
||||
</h3>
|
||||
<p class="text">
|
||||
{% trans "If you do not see the new window, we can help you launch it again." %}
|
||||
</p>
|
||||
<p>
|
||||
<a href="" data-open-in-popup-window class="btn btn-default">
|
||||
<span class="fa fa-external-link-square"></span>
|
||||
{% trans "Open window again" %}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text">
|
||||
{% trans "Once the process in the new window has been completed, you can continue here." %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingmodal" hidden aria-live="polite">
|
||||
<div class="modal-card">
|
||||
<div class="modal-card-icon">
|
||||
|
||||
@@ -14,24 +14,38 @@
|
||||
</h2>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<div class="form-group buttons">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-link btn-block" href="{% eventurl request.organizer "presale:organizer.customer.register" %}">
|
||||
{% trans "Create account" %}
|
||||
</a>
|
||||
{% if request.organizer.settings.customer_accounts_native %}
|
||||
{% bootstrap_form form %}
|
||||
<div class="form-group buttons">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-link btn-block" href="{% eventurl request.organizer "presale:organizer.customer.resetpw" %}">
|
||||
{% trans "Reset password" %}
|
||||
{% endif %}
|
||||
{% for provider in request.organizer.sso_providers.all %}
|
||||
{% if provider.is_active %}
|
||||
<a href="{% eventurl request.organizer "presale:organizer.customer.login" provider=provider.pk %}?{{ request.META.QUERY_STRING }}"
|
||||
class="btn btn-primary btn-lg btn-block">
|
||||
{{ provider.button_label }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if request.organizer.settings.customer_accounts_native %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-link btn-block"
|
||||
href="{% eventurl request.organizer "presale:organizer.customer.register" %}">
|
||||
{% trans "Create account" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-link btn-block"
|
||||
href="{% eventurl request.organizer "presale:organizer.customer.resetpw" %}">
|
||||
{% trans "Reset password" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,14 +19,18 @@
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "Customer ID" %}</dt>
|
||||
<dd>#{{ customer.identifier }}</dd>
|
||||
{% if customer.provider %}
|
||||
<dt>{% trans "Login method" %}</dt>
|
||||
<dd>{{ customer.provider.name }}</dd>
|
||||
{% endif %}
|
||||
<dt>{% trans "E-mail" %}</dt>
|
||||
<dd>{{ customer.email }}
|
||||
</dd>
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ customer.name }}</dd>
|
||||
{% if customer.phone %}
|
||||
<dt>{% trans "Phone" %}</dt>
|
||||
<dd>{{ customer.phone }}</dd>
|
||||
<dt>{% trans "Phone" %}</dt>
|
||||
<dd>{{ customer.phone }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
<div class="text-right">
|
||||
@@ -34,10 +38,12 @@
|
||||
class="btn btn-default">
|
||||
{% trans "Change account information" %}
|
||||
</a>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.customer.password" %}"
|
||||
class="btn btn-default">
|
||||
{% trans "Change password" %}
|
||||
</a>
|
||||
{% if not customer.provider %}
|
||||
<a href="{% eventurl request.organizer "presale:organizer.customer.password" %}"
|
||||
class="btn btn-default">
|
||||
{% trans "Change password" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
31
src/pretix/presale/templates/pretixpresale/postmessage.html
Normal file
31
src/pretix/presale/templates/pretixpresale/postmessage.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% load compress %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixpresale/scss/waiting.scss" %}"/>
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/postmessage.js" %}"></script>
|
||||
{% endcompress %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<i class="fa fa-cog big-rotating-icon" aria-hidden="true"></i>
|
||||
|
||||
<h1>{% trans "We are processing your request …" %}</h1>
|
||||
|
||||
{{ message|json_script:"postmessage" }}
|
||||
<script type="text/plain" id="origin">{{ origin }}</script>
|
||||
|
||||
<p>
|
||||
{% trans "If this takes longer than a few minutes, please contact us." %}
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user