mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
Do the thing
This commit is contained in:
parent
8cf2c96256
commit
84f85d944f
3 changed files with 21 additions and 6 deletions
|
@ -794,6 +794,21 @@ 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"""
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
|
@ -614,7 +614,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