mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-10 06:24:45 +02:00
Add purpose view
This commit is contained in:
parent
d8ae0d9753
commit
fab3e1b292
2 changed files with 44 additions and 0 deletions
|
@ -65,12 +65,20 @@ class ContactForm(forms.Form):
|
||||||
organization_name = forms.CharField(label="Organization Name")
|
organization_name = forms.CharField(label="Organization Name")
|
||||||
street_address = forms.CharField(label="Street address")
|
street_address = forms.CharField(label="Street address")
|
||||||
|
|
||||||
|
class PurposeForm(forms.Form):
|
||||||
|
purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea(
|
||||||
|
attrs={ 'class':'usa-textarea usa-character-count__field',
|
||||||
|
'id':'with-hint',
|
||||||
|
'aria-describedby':'instructions',
|
||||||
|
'maxlength':'500',
|
||||||
|
}))
|
||||||
|
|
||||||
# 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 = [
|
||||||
("organization", OrganizationForm),
|
("organization", OrganizationForm),
|
||||||
("contact", ContactForm),
|
("contact", ContactForm),
|
||||||
|
("purpose", PurposeForm),
|
||||||
]
|
]
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -78,6 +86,7 @@ FORMS = [
|
||||||
TEMPLATES = {
|
TEMPLATES = {
|
||||||
"organization": "application_organization.html",
|
"organization": "application_organization.html",
|
||||||
"contact": "application_contact.html",
|
"contact": "application_contact.html",
|
||||||
|
"purpose": "application_purpose.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
|
||||||
|
@ -85,6 +94,7 @@ TEMPLATES = {
|
||||||
TITLES = {
|
TITLES = {
|
||||||
"organization": "About your organization",
|
"organization": "About your organization",
|
||||||
"contact": "Your organization's contact information",
|
"contact": "Your organization's contact information",
|
||||||
|
"purpose": "Purpose of your domain",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
34
src/registrar/templates/application_purpose.html
Normal file
34
src/registrar/templates/application_purpose.html
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<!-- Test page -->
|
||||||
|
{% extends 'application_form.html' %}
|
||||||
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
|
{% block title %}Apply for a .gov domain - Puprose{% endblock %}
|
||||||
|
|
||||||
|
{% block form_content %}
|
||||||
|
<h1>Purpose of your domain</h1>
|
||||||
|
|
||||||
|
<p id="instructions">Explain how you plan to use this domain. Will you use it for a website and/or email? Are you moving your website from another top-level domain (like .com or .org)?Read about <a href="#">activities that are prohibited on .gov domains.</a></p>
|
||||||
|
|
||||||
|
<p>All fields are required unless they are marked optional.</p>
|
||||||
|
|
||||||
|
<form class="usa-form usa-form--large" method="post">
|
||||||
|
<div class="usa-form-group">
|
||||||
|
{{ wizard.management_form }}
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
<div class="usa-character-count">
|
||||||
|
{{ wizard.form.purpose_field|add_label_class:"usa-label" }}
|
||||||
|
{{ wizard.form.purpose_field}}
|
||||||
|
<span class="usa-character-count__message" id="with-hint-textarea-info with-hint-textarea-hint"> You can enter up to 500 characters </span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- {{ wizard.form.purpose_field|add_class:"usa-textarea usa-character-count__field"|attr:"aria-describedby:instructions"|attr:"maxlength=50" }} -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if wizard.steps.prev %}
|
||||||
|
<button name="wizard_goto_step" type="submit" class="usa-button usa-button--base" value="{{ wizard.steps.prev }}">Previous</button>
|
||||||
|
{% endif %}
|
||||||
|
<button type="submit" class="usa-button">Next</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue