Add authorizing official view

This commit is contained in:
igorkorenfeld 2022-11-04 14:31:50 -04:00
parent fab3e1b292
commit 1a9290ea15
No known key found for this signature in database
GPG key ID: 826947A4B867F659
2 changed files with 69 additions and 0 deletions

View file

@ -73,11 +73,23 @@ class PurposeForm(forms.Form):
'maxlength':'500',
}))
class AuthorizingOfficialForm(forms.Form):
ao_given_name = forms.CharField(label="First name/given name")
ao_middle_name = forms.CharField(
required=False,
label="Middle name (optional)",
)
ao_family_name = forms.CharField(label="Last name/family name")
ao_title = forms.CharField(label="Title or role in your organization")
ao_email = forms.EmailField(label="Email")
ao_phone = forms.CharField(label="Phone")
# List of forms in our wizard. Each entry is a tuple of a name and a form
# subclass
FORMS = [
("organization", OrganizationForm),
("contact", ContactForm),
("authorizing_official", AuthorizingOfficialForm),
("purpose", PurposeForm),
]
@ -86,6 +98,7 @@ FORMS = [
TEMPLATES = {
"organization": "application_organization.html",
"contact": "application_contact.html",
"authorizing_official": "application_authorizing_official.html",
"purpose": "application_purpose.html",
}
@ -94,6 +107,7 @@ TEMPLATES = {
TITLES = {
"organization": "About your organization",
"contact": "Your organization's contact information",
"authorizing_official": "Authorizing official",
"purpose": "Purpose of your domain",
}

View file

@ -0,0 +1,55 @@
<!-- Test page -->
{% extends 'application_form.html' %}
{% load widget_tweaks %}
{% load static %}
{% block title %}Apply for a .gov domain Authorizing official{% endblock %}
{% block form_content %}
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" class="usa-button usa-button--unstyled" value="{{ wizard.steps.prev }}">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{%static '/img/sprite.svg'%}#arrow_back"></use>
</svg>
Back
</button>
{% endif %}
<h1>Authorizing official</h1>
{{wizard.steps.current}}
{{form_titles|get_item:wizard.steps.current}}
<h2>Who is the authorizing official for your organization</h2>
<p id="instructions">Your authorizing official is the person within your organization who can authorize your domain request. This is generally the highest ranking or highest elected official in your organization. Read more about <a href="#">who can serve as an authorizing official</a>.
</p>
<p>All fields are required unless they are marked optional.</p>
<form class="usa-form usa-form--large" method="post">
{{ wizard.management_form }}
{% csrf_token %}
<fieldset class="usa-fieldset">
{{ wizard.form.ao_given_name|add_label_class:"usa-label" }}
{{ wizard.form.ao_given_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
{{ wizard.form.ao_middle_name|add_label_class:"usa-label" }}
{{ wizard.form.ao_middle_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
{{ wizard.form.ao_family_name|add_label_class:"usa-label" }}
{{ wizard.form.ao_family_name|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
{{ wizard.form.ao_title|add_label_class:"usa-label" }}
{{ wizard.form.ao_title|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
{{ wizard.form.ao_email|add_label_class:"usa-label" }}
{{ wizard.form.ao_email|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
{{ wizard.form.ao_phone|add_label_class:"usa-label" }}
{{ wizard.form.ao_phone|add_class:"usa-input usa-input"|attr:"aria-describedby:instructions" }}
</fieldset>
<button type="submit" class="usa-button">Next</button>
</form>
{% endblock %}