pushing to another device

This commit is contained in:
Matt-Spence 2025-02-27 13:03:50 -05:00
parent df303fa66f
commit fb06683982
No known key found for this signature in database
3 changed files with 67 additions and 70 deletions

View file

@ -5,88 +5,85 @@
<p>.Gov domains are intended for public use. Domains will not be given to organizations that only want to reserve a domain name (defensive registration) or that only intend to use the domain internally (as for an intranet).</p>
<p>Read about <a class="usa-link" rel="noopener noreferrer" target="_blank" href="{% public_site_url 'domains/requirements/' %}">activities that are prohibited on .gov domains.</a></p>
<h2>What is the purpose of your requested domain?</h2>
<h2>{{requires_feb_questions}}</h2>
{% endblock %}
{% if requires_feb_questions %}
{% block feb_fields %}
<fieldset class="usa-fieldset margin-top-0 dotgov-domain-form">
{{forms.0.management_form}}
{{forms.1.management_form}}
{{forms.2.management_form}}
{{forms.3.management_form}}
{{forms.4.management_form}}
{{forms.5.management_form}}
<p class="usa-label">
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.0.feb_purpose_choice %}
{% endwith %}
{% block form_required_fields_help_text %}
{# commented out so it does not appear on this page #}
{% endblock %}
<div id="domain-purpose-details-container" class="conditional-panel" style="display: none;">
{% block form_fields %}
{% if requires_feb_questions %}
<fieldset class="usa-fieldset margin-top-0 dotgov-domain-form">
{{forms.0.management_form}}
{{forms.1.management_form}}
{{forms.2.management_form}}
{{forms.3.management_form}}
{{forms.4.management_form}}
{{forms.5.management_form}}
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.1.purpose %}
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
{% input_with_errors forms.0.feb_purpose_choice %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
<legend>
<h3>Do you have a target time frame for launching this domain?</h3>
</legend>
<p class="usa-label">
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.2.has_timeframe %}
{% endwith %}
<div id="domain-purpose-details-container" class="conditional-panel" style="display: none;">
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.1.purpose %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
<div id="domain-timeframe-details-container" class="conditional-panel" style="display: none;">
<legend>
<h3>Do you have a target time frame for launching this domain?</h3>
</legend>
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.3.time_frame_details %}
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
{% input_with_errors forms.2.has_timeframe %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
<legend>
<h3>Will the domain name be used for an interagency initiative?</h3>
</legend>
<p class="usa-label">
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.4.is_interagency_initiative %}
{% endwith %}
<div id="domain-timeframe-details-container" class="conditional-panel" style="display: none;">
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.3.time_frame_details %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
<div id="domain-interagency-initaitive-details-container" class="conditional-panel" style="display: none;">
<legend>
<h3>Will the domain name be used for an interagency initiative?</h3>
</legend>
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
Select One <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.5.interagency_initiative_details %}
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
{% input_with_errors forms.4.is_interagency_initiative %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
</fieldset>
{% endblock %}
{% else %}
<p>Describe how youll use your .gov domain. Will it be used for a website, email, or something else?</p>
{% block form_required_fields_help_text %}
{# commented out so it does not appear on this page #}
{% endblock %}
<div id="domain-interagency-initaitive-details-container" class="conditional-panel" style="display: none;">
<p class="usa-label">
Provide details below <span class="usa-label--required">*</span>
</p>
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
{% input_with_errors forms.5.interagency_initiative_details %}
{% endwith %}
<p class="usa-hint">Maximum 2000 characters allowed.</p>
</div>
</fieldset>
{% else %}
<p>Describe how youll use your .gov domain. Will it be used for a website, email, or something else?</p>
{% block form_fields %}
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
{% input_with_errors forms.1.purpose %}
{% endwith %}
{% endblock %}
{% endif %}
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
{% input_with_errors forms.1.purpose %}
{% endwith %}
{% endif %}
{% endblock %}

View file

@ -14,7 +14,7 @@ from registrar.forms.domain_request_wizard import (
OtherContactsForm,
RequirementsForm,
TribalGovernmentForm,
PurposeForm,
PurposeDetailsForm,
AnythingElseForm,
AboutYourOrganizationForm,
)
@ -257,7 +257,7 @@ class TestFormValidation(MockEppLib):
@less_console_noise_decorator
def test_purpose_form_character_count_invalid(self):
"""Response must be less than 2000 characters."""
form = PurposeForm(
form = PurposeDetailsForm(
data={
"purpose": "Bacon ipsum dolor amet fatback strip steak pastrami"
"shankle, drumstick doner chicken landjaeger turkey andouille."

View file

@ -184,7 +184,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
def requires_feb_questions(self) -> bool:
# TODO: this is for testing, revert later
return False
return True
# return self.domain_request.is_feb() and flag_is_active_for_user(self.request.user, "organization_feature")
@property
@ -754,7 +754,7 @@ class Purpose(DomainRequestWizard):
# we only care about the purpose form in this case since it's used in both instances
return purpose_details_form.is_valid()
if not feb_purpose_options_form.id_valid():
if not feb_purpose_options_form.is_valid():
# Ensure details form doesn't throw errors if it's not showing
purpose_details_form.mark_form_for_deletion()
@ -764,7 +764,7 @@ class Purpose(DomainRequestWizard):
if not feb_timeframe_yes_no_form.is_valid() or not feb_initiative_yes_no_form.cleaned_data.get("is_interagency_initiative"):
# Ensure details form doesn't throw errors if it's not showing
feb_timeframe_details_form.mark_form_for_delation()
feb_timeframe_details_form.mark_form_for_deletion()
valid = all(form.is_valid() for form in forms_list if not form.form_data_marked_for_deletion)