mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Merge branch 'main' of https://github.com/cisagov/manage.get.gov into es/2914-request-purpose-screenreader
This commit is contained in:
commit
5471e201f7
5 changed files with 28 additions and 11 deletions
|
@ -46,8 +46,8 @@ DOMAIN_REQUEST_NAMESPACE = views.DomainRequestWizard.URL_NAMESPACE
|
||||||
# dynamically generate the other domain_request_urls
|
# dynamically generate the other domain_request_urls
|
||||||
domain_request_urls = [
|
domain_request_urls = [
|
||||||
path("", RedirectView.as_view(pattern_name="domain-request:start"), name="redirect-to-start"),
|
path("", RedirectView.as_view(pattern_name="domain-request:start"), name="redirect-to-start"),
|
||||||
path("start/", views.DomainRequestWizard.as_view(), name="start"),
|
path("start/", views.DomainRequestWizard.as_view(), name=views.DomainRequestWizard.NEW_URL_NAME),
|
||||||
path("finished/", views.Finished.as_view(), name="finished"),
|
path("finished/", views.Finished.as_view(), name=views.DomainRequestWizard.FINISHED_URL_NAME),
|
||||||
]
|
]
|
||||||
for step, view in [
|
for step, view in [
|
||||||
# add/remove steps here
|
# add/remove steps here
|
||||||
|
|
|
@ -799,6 +799,22 @@ class AnythingElseForm(BaseDeletableRegistrarForm):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class PortfolioAnythingElseForm(BaseDeletableRegistrarForm):
|
||||||
|
"""The form for the portfolio additional details page. Tied to the anything_else field."""
|
||||||
|
|
||||||
|
anything_else = forms.CharField(
|
||||||
|
required=False,
|
||||||
|
label="Anything else?",
|
||||||
|
widget=forms.Textarea(),
|
||||||
|
validators=[
|
||||||
|
MaxLengthValidator(
|
||||||
|
2000,
|
||||||
|
message="Response must be less than 2000 characters.",
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AnythingElseYesNoForm(BaseYesNoForm):
|
class AnythingElseYesNoForm(BaseYesNoForm):
|
||||||
"""Yes/no toggle for the anything else question on additional details"""
|
"""Yes/no toggle for the anything else question on additional details"""
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if step == Step.ADDITIONAL_DETAILS %}
|
{% if step == Step.ADDITIONAL_DETAILS %}
|
||||||
{% with title=form_titles|get_item:step value=domain_request.anything_else|default:"<span class='text-bold text-secondary-dark'>Incomplete</span>"|safe %}
|
{% with title=form_titles|get_item:step value=domain_request.anything_else|default:"None" %}
|
||||||
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
{% load static field_helpers %}
|
{% load static field_helpers %}
|
||||||
|
|
||||||
{% block form_required_fields_help_text %}
|
{% block form_required_fields_help_text %}
|
||||||
{% include "includes/required_fields.html" %}
|
{% comment %} Empty - this step is not required {% endcomment %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
|
|
||||||
<fieldset class="usa-fieldset margin-top-2">
|
<fieldset class="usa-fieldset">
|
||||||
<h2>Is there anything else you’d like us to know about your domain request?</h2>
|
<h2 class="margin-top-0 margin-bottom-0">Is there anything else you’d like us to know about your domain request?</h2>
|
||||||
</legend>
|
</legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="margin-top-3" id="anything-else">
|
<div id="anything-else">
|
||||||
<p><em>Provide details below. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em></p>
|
<p><em>This question is optional.</em></p>
|
||||||
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||||
{% input_with_errors forms.0.anything_else %}
|
{% input_with_errors forms.0.anything_else %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
|
@ -53,7 +53,8 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
URL_NAMESPACE = "domain-request"
|
URL_NAMESPACE = "domain-request"
|
||||||
# name for accessing /domain-request/<id>/edit
|
# name for accessing /domain-request/<id>/edit
|
||||||
EDIT_URL_NAME = "edit-domain-request"
|
EDIT_URL_NAME = "edit-domain-request"
|
||||||
NEW_URL_NAME = "/request/start/"
|
NEW_URL_NAME = "start"
|
||||||
|
FINISHED_URL_NAME = "finished"
|
||||||
|
|
||||||
# region: Titles
|
# region: Titles
|
||||||
# We need to pass our human-readable step titles as context to the templates.
|
# We need to pass our human-readable step titles as context to the templates.
|
||||||
|
@ -313,7 +314,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
# send users "to the domain request wizard" without needing to know which view
|
# send users "to the domain request wizard" without needing to know which view
|
||||||
# is first in the list of steps.
|
# is first in the list of steps.
|
||||||
if self.__class__ == DomainRequestWizard:
|
if self.__class__ == DomainRequestWizard:
|
||||||
if request.path_info == self.NEW_URL_NAME:
|
if current_url == self.NEW_URL_NAME:
|
||||||
# Clear context so the prop getter won't create a request here.
|
# Clear context so the prop getter won't create a request here.
|
||||||
# Creating a request will be handled in the post method for the
|
# Creating a request will be handled in the post method for the
|
||||||
# intro page.
|
# intro page.
|
||||||
|
@ -614,7 +615,7 @@ class RequestingEntity(DomainRequestWizard):
|
||||||
class PortfolioAdditionalDetails(DomainRequestWizard):
|
class PortfolioAdditionalDetails(DomainRequestWizard):
|
||||||
template_name = "portfolio_domain_request_additional_details.html"
|
template_name = "portfolio_domain_request_additional_details.html"
|
||||||
|
|
||||||
forms = [forms.AnythingElseForm]
|
forms = [forms.PortfolioAnythingElseForm]
|
||||||
|
|
||||||
|
|
||||||
# Non-portfolio pages
|
# Non-portfolio pages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue