From 511f94fc7f261d0d0df9c9b96bd2d8452b449ea9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 20 Feb 2021 23:19:27 +0100 Subject: [PATCH] *: cleanup code, return errors in challenge_invalid, fixup rendering --- authentik/core/templates/partials/form.html | 4 +- authentik/flows/challenge.py | 35 +++- authentik/flows/stage.py | 41 ++-- authentik/flows/templates/flows/shell.html | 2 +- authentik/flows/tests/test_views.py | 6 +- authentik/flows/views.py | 30 ++- authentik/sources/oauth/models.py | 4 +- authentik/sources/saml/models.py | 2 +- authentik/stages/captcha/tests.py | 2 +- authentik/stages/consent/tests.py | 6 +- authentik/stages/dummy/tests.py | 2 +- authentik/stages/email/tests/test_stage.py | 2 +- authentik/stages/identification/forms.py | 32 --- authentik/stages/identification/stage.py | 66 ++++-- authentik/stages/identification/tests.py | 48 +++-- authentik/stages/invitation/tests.py | 4 +- authentik/stages/password/tests.py | 2 +- authentik/stages/prompt/tests.py | 2 +- authentik/stages/user_delete/tests.py | 2 +- authentik/stages/user_login/tests.py | 2 +- authentik/stages/user_logout/tests.py | 2 +- authentik/stages/user_write/tests.py | 4 +- web/src/api/Flows.ts | 35 ++++ .../identification/IdentificationStage.ts | 76 +++++-- web/src/pages/generic/FlowExecutor.ts | 191 +++++------------- 25 files changed, 306 insertions(+), 296 deletions(-) diff --git a/authentik/core/templates/partials/form.html b/authentik/core/templates/partials/form.html index be6358093..4a3b81c4c 100644 --- a/authentik/core/templates/partials/form.html +++ b/authentik/core/templates/partials/form.html @@ -3,7 +3,7 @@ {% csrf_token %} {% if form.non_field_errors %} -
+

{{ form.non_field_errors }}

@@ -13,7 +13,7 @@ {% if field.field.widget|fieldtype == 'HiddenInput' %} {{ field }} {% else %} -
+
{% if field.field.widget|fieldtype == 'RadioSelect' %}