mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 10:29:23 +02:00
Add comment on Start new domain request button
This commit is contained in:
parent
7cf4c560b9
commit
1cf536ab3e
2 changed files with 5 additions and 13 deletions
|
@ -15,7 +15,11 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<h1>Manage your domains</h2>
|
<h1>Manage your domains</h2>
|
||||||
|
|
||||||
|
{% comment %}
|
||||||
|
IMPORTANT:
|
||||||
|
If this button is added on any other page, make sure to update the
|
||||||
|
relevant view to reset request.session["new_request"] = True
|
||||||
|
{% endcomment %}
|
||||||
<p class="margin-top-4">
|
<p class="margin-top-4">
|
||||||
<a href="{% url 'domain-request:' %}" class="usa-button"
|
<a href="{% url 'domain-request:' %}" class="usa-button"
|
||||||
>
|
>
|
||||||
|
|
|
@ -107,12 +107,6 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
|
Step.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_session_data(self, request):
|
|
||||||
"""Retrieve 'global' data from session:
|
|
||||||
The homepage sets new_request to True for the first Create domain request."""
|
|
||||||
is_a_new_request = self.request.session.get("new_request", "No data found")
|
|
||||||
return is_a_new_request
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.steps = StepsHelper(self)
|
self.steps = StepsHelper(self)
|
||||||
|
@ -445,12 +439,6 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
# We need to avoid creating a new domain request if the user
|
# We need to avoid creating a new domain request if the user
|
||||||
# clicks the back button
|
# clicks the back button
|
||||||
self.request.session["new_request"] = False
|
self.request.session["new_request"] = False
|
||||||
else:
|
|
||||||
# Reset the above logic to be extra safe;
|
|
||||||
# we do not want to stumble into a situation where a user
|
|
||||||
# unknowingly overwrites when she thinks she's working on a
|
|
||||||
# new request
|
|
||||||
self.request.session["new_request"] = True
|
|
||||||
self.steps.current = step
|
self.steps.current = step
|
||||||
return redirect(reverse(f"{self.URL_NAMESPACE}:{step}"))
|
return redirect(reverse(f"{self.URL_NAMESPACE}:{step}"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue