From 9367bc912631aa50acec75b1804bb13dcef2bad4 Mon Sep 17 00:00:00 2001 From: Cefin Date: Mon, 6 Dec 2021 14:50:37 +0000 Subject: rapid action on person record add account #5216 part four --- ishtar_common/models.py | 2 +- ishtar_common/urls.py | 5 ----- ishtar_common/views.py | 14 ++------------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/ishtar_common/models.py b/ishtar_common/models.py index af7908b53..74d81281d 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2919,7 +2919,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem): return actions actions += [ ( - reverse("account_creation", args=[self.pk]), + reverse("account_management", args=[self.pk]), _("Create new account"), "fa fa-user", "", diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py index 7490788c7..9e120a945 100644 --- a/ishtar_common/urls.py +++ b/ishtar_common/urls.py @@ -201,11 +201,6 @@ urlpatterns = [ check_rights(["add_ishtaruser"])(views.account_deletion_wizard), name="account_deletion", ), - url( - r"account_creation/(?P.+)?$", - check_rights(["add_ishtaruser"])(views.account_creation_wizard), - name="account_creation", - ), url( r"^import-new/$", check_rights(["change_import"])(views.NewImportView.as_view()), diff --git a/ishtar_common/views.py b/ishtar_common/views.py index ee7fc1ee7..9b7e8d5e2 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -307,16 +307,6 @@ account_management_wizard = wizards.AccountWizard.as_view( url_name="account_management", ) -account_creation_wizard = wizards.AccountWizard.as_view( - [ - ("account-account_management", forms.AccountForm), - ("profile-account_management", forms.ProfileFormset), - ("final-account_management", forms.FinalAccountForm), - ], - label=_("Account creation"), - url_name="account_creation", -) - account_deletion_wizard = wizards.IshtarUserDeletionWizard.as_view( [ ("selec-account_deletion", forms.AccountFormSelection), @@ -327,13 +317,13 @@ account_deletion_wizard = wizards.IshtarUserDeletionWizard.as_view( ) def account_create(request, pk): - if not wizard_is_available(account_creation_wizard, request, models.IshtarUser): + if not wizard_is_available(account_management_wizard, request, models.IshtarUser): return HttpResponseRedirect("/") wizards.AccountWizard.session_set_value( request, "selec-account_management", "pk", pk, reset=True ) return redirect( - reverse("account_creation", kwargs={"step": "account-account_management"}) + reverse("account_management", kwargs={"step": "account-account_management"}) ) -- cgit v1.2.3