From 130ffddf48f265393e17d22b5254eb073940470a Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 22 Jun 2021 16:23:05 +0200 Subject: [PATCH] Customers: Allow admin to trigger password reset --- .../pretixcontrol/organizers/customer.html | 58 +++++++++++-------- .../pretixcontrol/organizers/customers.html | 8 ++- src/pretix/control/views/organizer.py | 31 +++++++++- 3 files changed, 71 insertions(+), 26 deletions(-) diff --git a/src/pretix/control/templates/pretixcontrol/organizers/customer.html b/src/pretix/control/templates/pretixcontrol/organizers/customer.html index 51a39d75d3..b37b44943e 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/customer.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/customer.html @@ -22,31 +22,41 @@
-
-
{% trans "Customer ID" %}
-
#{{ customer.identifier }}
-
{% trans "Status" %}
-
- {% if not customer.is_active %} - {% trans "disabled" %} +
+ {% csrf_token %} +
+
{% trans "Customer ID" %}
+
#{{ customer.identifier }}
+
{% trans "Status" %}
+
+ {% if not customer.is_active %} + {% trans "disabled" %} {% elif not customer.is_verified %} - {% trans "not yet activated" %} - {% else %} - {% trans "active" %} - {% endif %} -
-
{% trans "E-mail" %}
-
{{ customer.email|default_if_none:"" }}
-
{% trans "Name" %}
-
{{ customer.name }}
-
{% trans "Locale" %}
-
{{ display_locale }}
-
{% trans "Registration date" %}
-
{{ customer.date_joined|date:"SHORT_DATETIME_FORMAT" }}
-
{% trans "Last login" %}
-
{% if customer.last_login %}{{ customer.last_login|date:"SHORT_DATETIME_FORMAT" }}{% else %} - –{% endif %}
-
+ {% trans "not yet activated" %} + {% else %} + {% trans "active" %} + {% endif %} +
+
{% trans "E-mail" %}
+
+ {{ customer.email|default_if_none:"" }} + {% if customer.email %} + + {% endif %} +
+
{% trans "Name" %}
+
{{ customer.name }}
+
{% trans "Locale" %}
+
{{ display_locale }}
+
{% trans "Registration date" %}
+
{{ customer.date_joined|date:"SHORT_DATETIME_FORMAT" }}
+
{% trans "Last login" %}
+
{% if customer.last_login %}{{ customer.last_login|date:"SHORT_DATETIME_FORMAT" }}{% else %} + –{% endif %}
+
+ {% else %}
-
+
{% bootstrap_field filter_form.query layout='inline' %}
+
+ {% bootstrap_field filter_form.status layout='inline' %} +
+
+ {% bootstrap_field filter_form.membership layout='inline' %} +