mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
Add summary box to page
This commit is contained in:
parent
f1f8a62753
commit
aaa9047478
4 changed files with 36 additions and 16 deletions
|
@ -15,6 +15,9 @@
|
||||||
|
|
||||||
.usa-form--extra-large {
|
.usa-form--extra-large {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
|
.usa-summary-box {
|
||||||
|
max-width: 600px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.usa-form--text-width {
|
.usa-form--text-width {
|
||||||
|
|
|
@ -15,6 +15,32 @@
|
||||||
<p>If you have <a href="{% public_site_url 'domains/before/#information-you%E2%80%99ll-need-to-complete-the-domain-request-form' %}" target="_blank" class="usa-link">all the information you need</a>,
|
<p>If you have <a href="{% public_site_url 'domains/before/#information-you%E2%80%99ll-need-to-complete-the-domain-request-form' %}" target="_blank" class="usa-link">all the information you need</a>,
|
||||||
completing your domain request might take around 15 minutes.</p>
|
completing your domain request might take around 15 minutes.</p>
|
||||||
|
|
||||||
|
<h2>How we’ll reach you</h2>
|
||||||
|
<p>
|
||||||
|
While reviewing your domain request, we may need to reach out with questions.
|
||||||
|
We’ll also email you when we complete our review.
|
||||||
|
If the contact information below is not correct, visit <a href="#">your profile</a> to make updates.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="usa-summary-box"
|
||||||
|
role="region"
|
||||||
|
aria-labelledby="contact-information"
|
||||||
|
>
|
||||||
|
<div class="usa-summary-box__body">
|
||||||
|
<h3 class="usa-summary-box__heading">
|
||||||
|
Your contact information
|
||||||
|
</h3>
|
||||||
|
<div class="usa-summary-box__text">
|
||||||
|
<ul>
|
||||||
|
<li>Full name: <b>{{ user.contact.full_name }}</b></li>
|
||||||
|
<li>Organization email: <b>{{ user.contact.email }}</b></li>
|
||||||
|
<li>Title or role in your organization: <b>{{ user.contact.title }}</b></li>
|
||||||
|
<li>Phone: <b>{{ user.contact.phone }}</b></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% block form_buttons %}
|
{% block form_buttons %}
|
||||||
<div class="stepnav">
|
<div class="stepnav">
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<button type="submit" name="contact_setup_save_button" class="usa-button usa-button--outline">
|
<button type="submit" name="contact_setup_save_button" class="usa-button usa-button--outline">
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
<input type="hidden" name="redirect_to_home" />
|
<input type="hidden" name="redirect_to_confirmation_page" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% block form_fields %}{% endblock %}
|
{% block form_fields %}{% endblock %}
|
||||||
|
|
|
@ -94,7 +94,6 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
# Update redirect type based on the query parameter if present
|
# Update redirect type based on the query parameter if present
|
||||||
redirect_type = request.GET.get("redirect", default_redirect)
|
redirect_type = request.GET.get("redirect", default_redirect)
|
||||||
|
|
||||||
# Store the redirect type in the session
|
|
||||||
self.redirect_type = redirect_type
|
self.redirect_type = redirect_type
|
||||||
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
@ -106,8 +105,7 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
case self.RedirectType.BACK_TO_SELF:
|
case self.RedirectType.BACK_TO_SELF:
|
||||||
return reverse("finish-contact-profile-setup", kwargs={"pk": self.object.pk})
|
return reverse("finish-contact-profile-setup", kwargs={"pk": self.object.pk})
|
||||||
case self.RedirectType.DOMAIN_REQUEST:
|
case self.RedirectType.DOMAIN_REQUEST:
|
||||||
# TODO
|
return reverse("domain-request:")
|
||||||
return reverse("home")
|
|
||||||
case _:
|
case _:
|
||||||
return reverse("home")
|
return reverse("home")
|
||||||
|
|
||||||
|
@ -116,19 +114,12 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
redirect_url = self.get_redirect_url()
|
redirect_url = self.get_redirect_url()
|
||||||
return redirect_url
|
return redirect_url
|
||||||
|
|
||||||
|
# TODO - delete session information
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
"""Form submission posts to this view.
|
"""Form submission posts to this view.
|
||||||
|
|
||||||
This post method harmonizes using BaseContactView and FormMixin
|
This post method harmonizes using BaseContactView and FormMixin
|
||||||
"""
|
"""
|
||||||
# Default redirect type
|
|
||||||
default_redirect = self.RedirectType.BACK_TO_SELF
|
|
||||||
|
|
||||||
# Update redirect type based on the query parameter if present
|
|
||||||
redirect_type = request.GET.get("redirect", default_redirect)
|
|
||||||
|
|
||||||
# Store the redirect type in the session
|
|
||||||
self.redirect_type = redirect_type
|
|
||||||
|
|
||||||
# Set the current contact object in cache
|
# Set the current contact object in cache
|
||||||
self._set_contact(request)
|
self._set_contact(request)
|
||||||
|
@ -140,7 +131,7 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
if 'contact_setup_save_button' in request.POST:
|
if 'contact_setup_save_button' in request.POST:
|
||||||
# Logic for when the 'Save' button is clicked
|
# Logic for when the 'Save' button is clicked
|
||||||
self.redirect_type = self.RedirectType.BACK_TO_SELF
|
self.redirect_type = self.RedirectType.BACK_TO_SELF
|
||||||
self.session["should_redirect_to_home"] = "redirect_to_home" in request.POST
|
self.session["should_redirect"] = "redirect_to_confirmation_page" in request.POST
|
||||||
elif 'contact_setup_submit_button' in request.POST:
|
elif 'contact_setup_submit_button' in request.POST:
|
||||||
# Logic for when the 'Save and continue' button is clicked
|
# Logic for when the 'Save and continue' button is clicked
|
||||||
if self.redirect_type != self.RedirectType.DOMAIN_REQUEST:
|
if self.redirect_type != self.RedirectType.DOMAIN_REQUEST:
|
||||||
|
@ -153,7 +144,7 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
|
||||||
if self.redirect_type == self.RedirectType.HOME:
|
if self.redirect_type != self.RedirectType.BACK_TO_SELF:
|
||||||
self.request.user.finished_setup = True
|
self.request.user.finished_setup = True
|
||||||
self.request.user.save()
|
self.request.user.save()
|
||||||
|
|
||||||
|
@ -172,7 +163,7 @@ class ContactProfileSetupView(ContactFormBaseView):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context["email_sublabel_text"] = self._email_sublabel_text()
|
context["email_sublabel_text"] = self._email_sublabel_text()
|
||||||
|
|
||||||
if "should_redirect_to_home" in self.session:
|
if "should_redirect" in self.session:
|
||||||
context["confirm_changes"] = True
|
context["confirm_changes"] = True
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue