Create current site and .gov views

This commit is contained in:
igorkorenfeld 2022-11-07 18:42:57 -05:00
parent 62d3675110
commit 2d53a7f07c
No known key found for this signature in database
GPG key ID: 826947A4B867F659
3 changed files with 122 additions and 3 deletions

View file

@ -65,9 +65,6 @@ class ContactForm(forms.Form):
organization_name = forms.CharField(label="Organization Name")
street_address = forms.CharField(label="Street address")
class PurposeForm(forms.Form):
purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea())
class AuthorizingOfficialForm(forms.Form):
given_name = forms.CharField(label="First name/given name")
middle_name = forms.CharField(
@ -79,12 +76,28 @@ class AuthorizingOfficialForm(forms.Form):
email = forms.EmailField(label="Email")
phone = forms.CharField(label="Phone")
class CurrentSitesForm(forms.Form):
current_site = forms.CharField(label="Enter your organizations public website, if you have one. For example, www.city.com.")
class DotGovDomainForm(forms.Form):
dotgov_domain = forms.CharField(label="What .gov domain do you want?")
alternative_domain = forms.CharField(
required = False,
label="Are there other domains youd like if we cant give you your first choice? Entering alternative domains is optional.",
)
class PurposeForm(forms.Form):
purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea())
# 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),
("current_sites", CurrentSitesForm),
("dotgov_domain", DotGovDomainForm),
("purpose", PurposeForm),
]
@ -94,6 +107,8 @@ TEMPLATES = {
"organization": "application_organization.html",
"contact": "application_contact.html",
"authorizing_official": "application_authorizing_official.html",
"current_sites": "application_current_sites.html",
"dotgov_domain": "application_dotgov_domain.html",
"purpose": "application_purpose.html",
}
@ -103,6 +118,8 @@ TITLES = {
"organization": "About your organization",
"contact": "Your organization's contact information",
"authorizing_official": "Authorizing official",
"current_sites": "Website for your organization",
"dotgov_domain": ".gov domain",
"purpose": "Purpose of your domain",
}

View file

@ -0,0 +1,25 @@
<!-- Test page -->
{% extends 'application_form.html' %}
{% load widget_tweaks %}
{% load static %}
{% block backnav %}
{% with form_name="step__current-site" %}
{{ block.super }}
{% endwith %}
{% endblock %}
{% block form_content %}
<form class="usa-form usa-form--large" id="step__current-site" method="post">
{{ wizard.management_form }}
{% csrf_token %}
{{ wizard.form.current_site|add_label_class:"usa-label" }}
{{ wizard.form.current_site|add_class:"usa-input" }}
{{ block.super }}
</form>
{% endblock %}

View file

@ -0,0 +1,77 @@
<!-- Test page -->
{% extends 'application_form.html' %}
{% load widget_tweaks static%}
{% block backnav %}
{% with form_name="step__dotgov-domain" %}
{{ block.super }}
{% endwith %}
{% endblock %}
{% block form_content %}
<p> Before requesting a .gov domain, <a href="#">please make sure it meets our naming requirements.</a> Your domain name must:
<ul class="usa-list">
<li>Be available </li>
<li>Be unique </li>
<li>Relate to your organizations name, location, and/or services </li>
<li>Be clear to the general public. Your domain name must not be easily confused with other organizations.</li>
</ul>
</p>
<p>Note that <em> only federal agencies can request generic terms </em>like vote.gov.</p>
<p>Well try to give you the domain you want. We first need to make sure your request meets our requirements. Well work with you to find the best domain for your organization.</p>
<p>Here are a few domain examples for your type of organization.</p>
<p> Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.</p>
<p>Examples:
<ul class="usa-list">
<li>www.BlufftonIndiana.gov</li>
<li>www.CityofEudoraKS.gov</li>
<li>www.WallawallaWA.gov</li>
</ul>
</p>
<p> Some cities dont have to refer to their state.
<ul class="usa-list">
<li> City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureaus National Places Gazetteer Files to determine if names are unique. </li>
<li>Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.</li>
<li>The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that dont refer to their state.</li>
</ul>
</p>
<form id="step__dotgov-domain" class="usa-form usa-form--large" method="post">
<h2> What .gov domain do you want? </h2>
<p class="domain_instructions"> After you enter your domain, well make sure its available and that it meets some of our naming requirements. If your domain passes these initial checks, well verify that it meets all of our requirements once you complete and submit the rest of the domain request form. </p>
{{ wizard.management_form }}
{% csrf_token %}
{{ wizard.form.dotgov_domain|add_label_class:"usa-label" }}
<div class="display-flex flex-align-center">
<span class="padding-top-05">www.</span>
{{ wizard.form.dotgov_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }}
<span class="padding-top-05">.gov </span>
</div>
<h2>Alternative domains</h2>
<div>
{{ wizard.form.alternative_domain|add_label_class:"usa-label" }}
<div class="display-flex flex-align-center">
<span class="padding-top-05">www.</span>
{{ wizard.form.alternative_domain|add_class:"usa-input" }}
<span class="padding-top-05">.gov </span>
</div>
<button type="button" class="usa-button usa-button--unstyled">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{%static '/img/sprite.svg'%}#add_circle"></use>
</svg><span class="margin-left-05">Add another alternative</span>
</button>
</div>
{{ block.super }}
</form>
{% endblock %}