Add review view

This commit is contained in:
igorkorenfeld 2022-11-08 18:29:46 -05:00
parent fae6d49b02
commit 74c11cc231
No known key found for this signature in database
GPG key ID: 826947A4B867F659
3 changed files with 31 additions and 1 deletions

View file

@ -138,6 +138,9 @@ class AnythingElseForm(forms.Form):
class RequirementsForm(forms.Form): class RequirementsForm(forms.Form):
agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.") agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.")
class ReviewForm(forms.Form):
pass
# List of forms in our wizard. Each entry is a tuple of a name and a form # List of forms in our wizard. Each entry is a tuple of a name and a form
# subclass # subclass
FORMS = [ FORMS = [
@ -152,6 +155,7 @@ FORMS = [
("security_email", SecurityEmailForm), ("security_email", SecurityEmailForm),
("anything_else", AnythingElseForm), ("anything_else", AnythingElseForm),
("requirements", RequirementsForm), ("requirements", RequirementsForm),
("review", ReviewForm),
] ]
# Dict to match up the right template with the right step. Keys here must # Dict to match up the right template with the right step. Keys here must
@ -168,6 +172,7 @@ TEMPLATES = {
"security_email": "application_security_email.html", "security_email": "application_security_email.html",
"anything_else": "application_anything_else.html", "anything_else": "application_anything_else.html",
"requirements": "application_requirements.html", "requirements": "application_requirements.html",
"review": "application_review.html",
} }
# We need to pass our page titles as context to the templates, indexed # We need to pass our page titles as context to the templates, indexed
@ -184,6 +189,7 @@ TITLES = {
"security_email": "Security email for public use", "security_email": "Security email for public use",
"anything_else": "Anything else we should know?", "anything_else": "Anything else we should know?",
"requirements": "Requirements for registration and operation of .gov domains", "requirements": "Requirements for registration and operation of .gov domains",
"review": "Review and submit your domain request",
} }

View file

@ -21,7 +21,7 @@
<button type="submit" class="usa-button">Next</button> <button type="submit" class="usa-button">Next</button>
<button type="button" class="usa-button usa-button--outline">Save</button> <button type="button" class="usa-button usa-button--outline">Save</button>
{% else %} {% else %}
<button type="submit" class="usa-button">Submit</button> <button type="submit" class="usa-button">Submit your domain request</button>
<button type="button" class="usa-button usa-button--outline">Save</button> <button type="button" class="usa-button usa-button--outline">Save</button>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -0,0 +1,24 @@
<!-- Test page -->
{% extends 'application_form.html' %}
{% load static widget_tweaks %}
{% block form_content %}
<form id="step__{{wizard.steps.current}}" class="usa-form usa-form--large" method="post">
{% for this_step in wizard.steps.all|slice:":-1" %}
<div class="review__step margin-top-2">
<div class="review__step__title display-flex flex-justify">
<span class="review__step__name">{{ form_titles|get_item:this_step }}</span>
<a href="{% url wizard.url_name step=this_step %}">Edit </a>
</div>
<div class="review__step__value">
&lt;Answer value&gt;
</div>
</div>
{% endfor %}
{{ block.super }}
</form>
{% endblock %}