mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
fix session issue
This commit is contained in:
parent
aa930eb77c
commit
37894e7ede
6 changed files with 10 additions and 16 deletions
|
@ -39,13 +39,9 @@ from registrar.views.utility import always_404
|
||||||
from api.views import available, rdap, get_current_federal, get_current_full
|
from api.views import available, rdap, get_current_federal, get_current_full
|
||||||
|
|
||||||
DOMAIN_REQUEST_NAMESPACE = views.DomainRequestWizard.URL_NAMESPACE
|
DOMAIN_REQUEST_NAMESPACE = views.DomainRequestWizard.URL_NAMESPACE
|
||||||
domain_request_start_and_finished_urls = [
|
|
||||||
path("start/", views.DomainRequestWizard.as_view(), name="start"),
|
|
||||||
path("finished/", views.Finished.as_view(), name="finished"),
|
|
||||||
]
|
|
||||||
domain_request_urls = []
|
|
||||||
|
|
||||||
# dynamically generate the other domain_request_urls
|
# dynamically generate the other domain_request_urls
|
||||||
|
domain_request_urls = []
|
||||||
for step, view in [
|
for step, view in [
|
||||||
# add/remove steps here
|
# add/remove steps here
|
||||||
(Step.ORGANIZATION_TYPE, views.OrganizationType),
|
(Step.ORGANIZATION_TYPE, views.OrganizationType),
|
||||||
|
@ -255,8 +251,8 @@ urlpatterns = [
|
||||||
path("health", views.health, name="health"),
|
path("health", views.health, name="health"),
|
||||||
path("openid/", include("djangooidc.urls")),
|
path("openid/", include("djangooidc.urls")),
|
||||||
path("request/start/", views.DomainRequestWizard.as_view(), name="start"),
|
path("request/start/", views.DomainRequestWizard.as_view(), name="start"),
|
||||||
#path("request/", include((domain_request_start_and_finished_urls, DOMAIN_REQUEST_NAMESPACE))),
|
path("request/finished/", views.Finished.as_view(), name="finished"),
|
||||||
path("request/<int:pk>/", include((domain_request_urls, DOMAIN_REQUEST_NAMESPACE))),
|
path("request/<int:id>/", include((domain_request_urls, DOMAIN_REQUEST_NAMESPACE))),
|
||||||
path("api/v1/available/", available, name="available"),
|
path("api/v1/available/", available, name="available"),
|
||||||
path("api/v1/rdap/", rdap, name="rdap"),
|
path("api/v1/rdap/", rdap, name="rdap"),
|
||||||
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
|
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="tablet:grid-col-9">
|
<div class="tablet:grid-col-9">
|
||||||
<main id="main-content" class="grid-container register-form-step">
|
<main id="main-content" class="grid-container register-form-step">
|
||||||
{% if steps.prev %}
|
{% if steps.prev %}
|
||||||
<a href="{% namespaced_url 'domain-request' steps.prev pk=domain_request_id %}" class="breadcrumb__back">
|
<a href="{% namespaced_url 'domain-request' steps.prev id=domain_request_id %}" class="breadcrumb__back">
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#arrow_back"></use>
|
<use xlink:href="{%static 'img/sprite.svg'%}#arrow_back"></use>
|
||||||
</svg><span class="margin-left-05">Previous step</span>
|
</svg><span class="margin-left-05">Previous step</span>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% namespaced_url 'domain-request' this_step pk=domain_request_id %}"
|
<a href="{% namespaced_url 'domain-request' this_step id=domain_request_id %}"
|
||||||
{% if this_step == steps.current %}
|
{% if this_step == steps.current %}
|
||||||
class="usa-current"
|
class="usa-current"
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% for step in steps %}
|
{% for step in steps %}
|
||||||
<section class="summary-item margin-top-3">
|
<section class="summary-item margin-top-3">
|
||||||
{% if is_editable %}
|
{% if is_editable %}
|
||||||
{% namespaced_url 'domain-request' step pk=domain_request_id as domain_request_url %}
|
{% namespaced_url 'domain-request' step id=domain_request_id as domain_request_url %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if step == Step.REQUESTING_ENTITY %}
|
{% if step == Step.REQUESTING_ENTITY %}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% for step in steps %}
|
{% for step in steps %}
|
||||||
<section class="summary-item margin-top-3">
|
<section class="summary-item margin-top-3">
|
||||||
{% if is_editable %}
|
{% if is_editable %}
|
||||||
{% namespaced_url 'domain-request' step pk=domain_request_id as domain_request_url %}
|
{% namespaced_url 'domain-request' step id=domain_request_id as domain_request_url %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if step == Step.ORGANIZATION_TYPE %}
|
{% if step == Step.ORGANIZATION_TYPE %}
|
||||||
|
|
|
@ -308,6 +308,8 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
if current_url == self.EDIT_URL_NAME and "id" in kwargs:
|
if current_url == self.EDIT_URL_NAME and "id" in kwargs:
|
||||||
del self.storage
|
del self.storage
|
||||||
self.storage["domain_request_id"] = kwargs["id"]
|
self.storage["domain_request_id"] = kwargs["id"]
|
||||||
|
elif "id" not in kwargs:
|
||||||
|
del self.storage
|
||||||
|
|
||||||
# if accessing this class directly, redirect to either to an acknowledgement
|
# if accessing this class directly, redirect to either to an acknowledgement
|
||||||
# page or to the first step in the processes (if an edit rather than a new request);
|
# page or to the first step in the processes (if an edit rather than a new request);
|
||||||
|
@ -496,11 +498,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
|
|
||||||
def goto(self, step):
|
def goto(self, step):
|
||||||
self.steps.current = step
|
self.steps.current = step
|
||||||
self.domain_request
|
return redirect(reverse(f"{self.URL_NAMESPACE}:{step}", kwargs={"id": self.domain_request.id}))
|
||||||
# Get or create the domain request
|
|
||||||
domain_request = self.domain_request
|
|
||||||
test = self.storage.get("domain_request_id")
|
|
||||||
return redirect(reverse(f"{self.URL_NAMESPACE}:{step}", kwargs={"pk": domain_request.pk}))
|
|
||||||
|
|
||||||
def goto_next_step(self):
|
def goto_next_step(self):
|
||||||
"""Redirects to the next step."""
|
"""Redirects to the next step."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue