diff --git a/src/registrar/templates/application_intro.html b/src/registrar/templates/application_intro.html new file mode 100644 index 000000000..06e248162 --- /dev/null +++ b/src/registrar/templates/application_intro.html @@ -0,0 +1,31 @@ +{% extends 'base.html' %} +{% load static form_helpers url_helpers %} + +{% block content %} +
+
+ +
+ {% csrf_token %} + +

You're about to start your .gov domain request. You don't have to complete the process in one session. You can save what you enter and come back to it when you're ready.

+

We'll use this information you provide to verify your organization's eligibility for a .gov domain. We'll also verify that the domain you request meets our guidelines.

+

If you have all the information you need, completing your domain request might take around 15 minutes. Contact us if you need help with your request.

+ +{% block form_buttons %} +
+ +
+{% endblock %} + +
+ +
+
+{% endblock %} diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py index 41052e164..720582edd 100644 --- a/src/registrar/views/application.py +++ b/src/registrar/views/application.py @@ -209,16 +209,16 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView): # if accessing this class directly, redirect to the first step # in other words, if `ApplicationWizard` is called as view # directly by some redirect or url handler, we'll send users - # to the first step in the processes; subclasses will NOT - # be redirected. The purpose of this is to allow code to + # either to an acknowledgement page or to the first step in + # the processes (if an edit rather than a new request); subclasses + # will NOT be redirected. The purpose of this is to allow code to # send users "to the application wizard" without needing to # know which view is first in the list of steps. if self.__class__ == ApplicationWizard: - # if starting a new application, clear the storage if request.path_info == self.NEW_URL_NAME: - del self.storage - - return self.goto(self.steps.first) + return render(request, "application_intro.html") + else: + return self.goto(self.steps.first) self.steps.current = current_url context = self.get_context_data() @@ -373,12 +373,20 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView): def post(self, request, *args, **kwargs) -> HttpResponse: """This method handles POST requests.""" + + # which button did the user press? + button: str = request.POST.get("submit_button", "") + + # if user has acknowledged the intro message + if button == "intro_acknowledge": + if request.path_info == self.NEW_URL_NAME: + del self.storage + return self.goto(self.steps.first) + # if accessing this class directly, redirect to the first step if self.__class__ == ApplicationWizard: return self.goto(self.steps.first) - # which button did the user press? - button: str = request.POST.get("submit_button", "") forms = self.get_forms(use_post=True) if self.is_valid(forms):