mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
* OMB verbage updates * Removed current websites step from Orgmodel domain request wizard * Implemented OMB feedback for "Purpose of your domain" page * Remove EOP (everywhere) * add migration (for EOP removal in model) * OMB changes for Additional details * OMB changes for "Requirements for operating a .gov domain" section * OMB changes for summary * update e-mail to reflect OMB summary changes * Unit test fixes & fix hyperlinks * linted * Link adjustments * restored stray delete * error message update for FEB interagency question
This commit is contained in:
parent
71eef1f0b1
commit
c7d3260ac4
19 changed files with 168 additions and 300 deletions
|
@ -2845,8 +2845,6 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportRegistrarModelAdmin):
|
|||
"cisa_representative_first_name",
|
||||
"cisa_representative_last_name",
|
||||
"cisa_representative_email",
|
||||
"eop_stakeholder_first_name",
|
||||
"eop_stakeholder_last_name",
|
||||
]
|
||||
},
|
||||
),
|
||||
|
@ -3065,8 +3063,6 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportRegistrarModelAdmin):
|
|||
"feb_purpose_choice",
|
||||
"time_frame_details",
|
||||
"interagency_initiative_details",
|
||||
"eop_stakeholder_first_name",
|
||||
"eop_stakeholder_last_name",
|
||||
]
|
||||
|
||||
org_fields = [
|
||||
|
|
|
@ -15,12 +15,13 @@ export const domain_purpose_choice_callbacks = {
|
|||
showElement(element);
|
||||
// change just the text inside the em tag
|
||||
const labelElement = element.querySelector('p em');
|
||||
labelElement.innerHTML = 'Explain why a new domain name is needed instead of using a ' +
|
||||
'subdomain of an existing website.' +
|
||||
'<br><br>' + // Adding double line break for spacing
|
||||
'Include any information or data that shows how the new domain would ' +
|
||||
'benefit the public or meet user needs. ' +
|
||||
'<span class="usa-label--required">*</span>';
|
||||
labelElement.innerHTML = `
|
||||
<p>Describe how the domain will be used. Explain why a new domain name is needed
|
||||
instead of using a subdomain or subdirectory of an existing website.</p>
|
||||
<p>Include any qualitative or quantitative data that supports there being a
|
||||
clear user need or public benefit for the new domain.
|
||||
<span class="usa-label--required">*</span></p>
|
||||
`;
|
||||
|
||||
// Mark that we're no longer in initial load
|
||||
isInitialLoad = false;
|
||||
|
@ -38,8 +39,13 @@ export const domain_purpose_choice_callbacks = {
|
|||
showElement(element);
|
||||
// change just the text inside the em tag
|
||||
const labelElement = element.querySelector('p em');
|
||||
labelElement.innerHTML = 'Explain why a redirect is necessary. ' +
|
||||
'<span class="usa-label--required">*</span>';
|
||||
labelElement.innerHTML = `
|
||||
<p>Describe how the domain will be used. Provide the URL where the
|
||||
new domain will resolve and explain why a redirect is necessary.</p>
|
||||
<p>Include any qualitative or quantitative data that supports
|
||||
there being a clear user need or public benefit for the new domain as a redirect.
|
||||
<span class="usa-label--required">*</span></p>
|
||||
`;
|
||||
|
||||
// Mark that we're no longer in initial load
|
||||
isInitialLoad = false;
|
||||
|
@ -57,8 +63,11 @@ export const domain_purpose_choice_callbacks = {
|
|||
showElement(element);
|
||||
// change just the text inside the em tag
|
||||
const labelElement = element.querySelector('p em');
|
||||
labelElement.innerHTML = 'Describe how this domain will be used. ' +
|
||||
'<span class="usa-label--required">*</span>';
|
||||
labelElement.innerHTML = `
|
||||
<p>Describe how the domain will be used
|
||||
(e.g. email, internal network purposes).
|
||||
<span class="usa-label--required">*</span></p>
|
||||
`;
|
||||
|
||||
// Mark that we're no longer in initial load
|
||||
isInitialLoad = false;
|
||||
|
|
|
@ -28,7 +28,6 @@ initFormDSData();
|
|||
hookupYesNoListener("other_contacts-has_other_contacts",'other-employees', 'no-other-employees');
|
||||
hookupYesNoListener("additional_details-has_anything_else_text",'anything-else', null);
|
||||
hookupYesNoListener("additional_details-has_cisa_representative",'cisa-representative', null);
|
||||
hookupYesNoListener("portfolio_additional_details-working_with_eop", "eop-contact-container", null);
|
||||
hookupYesNoListener("portfolio_additional_details-has_anything_else_text", 'anything-else-details-container', null);
|
||||
hookupYesNoListener("dotgov_domain-feb_naming_requirements", null, "domain-naming-requirements-details-container");
|
||||
|
||||
|
|
|
@ -121,72 +121,17 @@ class FEBInteragencyInitiativeYesNoForm(BaseDeletableRegistrarForm, BaseYesNoFor
|
|||
class FEBInteragencyInitiativeDetailsForm(BaseDeletableRegistrarForm):
|
||||
interagency_initiative_details = forms.CharField(
|
||||
label="interagency_initiative_details",
|
||||
widget=forms.Textarea(attrs={"aria-label": "Name the agencies that will be involved in this initiative."}),
|
||||
widget=forms.Textarea(attrs={"aria-label": "Provide details on the nature of the interagency initiative."}),
|
||||
validators=[
|
||||
MaxLengthValidator(
|
||||
2000,
|
||||
message="Response must be less than 2000 characters.",
|
||||
)
|
||||
],
|
||||
error_messages={"required": "Name the agencies that will be involved in this initiative."},
|
||||
error_messages={"required": "Provide details on the nature of the interagency initiative."},
|
||||
)
|
||||
|
||||
|
||||
class WorkingWithEOPYesNoForm(BaseDeletableRegistrarForm, BaseYesNoForm):
|
||||
"""
|
||||
Form for determining if the Federal Executive Branch (FEB) agency is working with the
|
||||
Executive Office of the President (EOP) on the domain request.
|
||||
"""
|
||||
|
||||
field_name = "working_with_eop"
|
||||
|
||||
@property
|
||||
def form_is_checked(self):
|
||||
"""
|
||||
Determines the initial checked state of the form based on the domain_request's attributes.
|
||||
"""
|
||||
return self.domain_request.working_with_eop
|
||||
|
||||
|
||||
class EOPContactForm(BaseDeletableRegistrarForm):
|
||||
"""
|
||||
Form for contact information of the representative of the
|
||||
Executive Office of the President (EOP) that the Federal
|
||||
Executive Branch (FEB) agency is working with.
|
||||
"""
|
||||
|
||||
first_name = forms.CharField(
|
||||
label="First name / given name",
|
||||
error_messages={"required": "Enter the first name / given name of this contact."},
|
||||
required=True,
|
||||
)
|
||||
last_name = forms.CharField(
|
||||
label="Last name / family name",
|
||||
error_messages={"required": "Enter the last name / family name of this contact."},
|
||||
required=True,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_database(cls, obj):
|
||||
return {
|
||||
"first_name": obj.eop_stakeholder_first_name,
|
||||
"last_name": obj.eop_stakeholder_last_name,
|
||||
}
|
||||
|
||||
def to_database(self, obj):
|
||||
# This function overrides the behavior of the BaseDeletableRegistrarForm.
|
||||
# in order to preserve deletable functionality, we need to call the
|
||||
# superclass's to_database method if the form is marked for deletion.
|
||||
if self.form_data_marked_for_deletion:
|
||||
super().to_database(obj)
|
||||
return
|
||||
if not self.is_valid():
|
||||
return
|
||||
obj.eop_stakeholder_first_name = self.cleaned_data["first_name"]
|
||||
obj.eop_stakeholder_last_name = self.cleaned_data["last_name"]
|
||||
obj.save()
|
||||
|
||||
|
||||
class FEBAnythingElseYesNoForm(BaseYesNoForm, BaseDeletableRegistrarForm):
|
||||
"""Yes/no toggle for the anything else question on additional details"""
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# Generated by Django 4.2.20 on 2025-05-27 03:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("registrar", "0148_alter_domain_name_domain_unique_name_except_deleted"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="domainrequest",
|
||||
name="feb_purpose_choice",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[
|
||||
("new", "Used for a new website"),
|
||||
("redirect", "Used as a redirect for an existing or new website"),
|
||||
("other", "Not for a website"),
|
||||
],
|
||||
null=True,
|
||||
verbose_name="Purpose type",
|
||||
),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 4.2.20 on 2025-05-28 00:24
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("registrar", "0149_alter_domainrequest_feb_purpose_choice"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name="domainrequest",
|
||||
name="eop_stakeholder_first_name",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="domainrequest",
|
||||
name="eop_stakeholder_last_name",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="domainrequest",
|
||||
name="working_with_eop",
|
||||
),
|
||||
]
|
|
@ -56,7 +56,7 @@ class DomainRequest(TimeStampedModel):
|
|||
|
||||
class FEBPurposeChoices(models.TextChoices):
|
||||
WEBSITE = "new", "Used for a new website"
|
||||
REDIRECT = "redirect", "Used as a redirect for an existing website"
|
||||
REDIRECT = "redirect", "Used as a redirect for an existing or new website"
|
||||
OTHER = "other", "Not for a website"
|
||||
|
||||
@classmethod
|
||||
|
@ -532,23 +532,6 @@ class DomainRequest(TimeStampedModel):
|
|||
verbose_name="Purpose type",
|
||||
)
|
||||
|
||||
working_with_eop = models.BooleanField(
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
eop_stakeholder_first_name = models.CharField(
|
||||
null=True,
|
||||
blank=True,
|
||||
verbose_name="EOP contact first name",
|
||||
)
|
||||
|
||||
eop_stakeholder_last_name = models.CharField(
|
||||
null=True,
|
||||
blank=True,
|
||||
verbose_name="EOP contact last name",
|
||||
)
|
||||
|
||||
# This field is alternately used for generic domain purpose explanations
|
||||
# and for explanations of the specific purpose chosen with feb_purpose_choice
|
||||
purpose = models.TextField(
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
{% block form_instructions %}
|
||||
<p>
|
||||
Before requesting a .gov domain, please make sure it meets
|
||||
Before requesting a .gov domain, please make sure it meets the
|
||||
{% if requires_feb_questions %}
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://get.gov/domains/executive-branch-guidance/">our naming requirements for executive branch agencies</a>. Your domain name must:
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://get.gov/domains/executive-branch-guidance/">naming requirements for executive branch agencies</a>. Your domain name must:
|
||||
{% else %}
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="{% public_site_url 'domains/choosing' %}">our naming requirements</a>. Your domain name must:
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="{% public_site_url 'domains/choosing' %}">naming requirements</a>. Your domain name must:
|
||||
{% endif %}
|
||||
<ul class="usa-list">
|
||||
<li>Be available </li>
|
||||
|
@ -23,8 +23,7 @@
|
|||
<p>Requests for your organization’s initials or an abbreviated name might not be approved, but we encourage you to request the name you want.</p>
|
||||
{% endif %}
|
||||
|
||||
<p>Note that <strong>only federal agencies can request generic terms</strong> like
|
||||
vote.gov.</p>
|
||||
<p>Read about <a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://get.gov/domains/requirements/">activities that are prohibited on .gov domains</a>.</p>
|
||||
{% if not portfolio %}
|
||||
<h2 class="margin-top-3">Domain examples for your type of organization</h2>
|
||||
<div class="domain_example">
|
||||
|
@ -48,8 +47,8 @@
|
|||
<h2>What .gov domain do you want?</h2>
|
||||
</legend>
|
||||
<p id="domain_instructions" class="margin-top-05">
|
||||
After you enter your domain, we’ll make sure it’s available and that it meets some of our naming requirements.
|
||||
If your domain passes these initial checks, we’ll verify that it meets all our requirements after you complete the rest of this form.
|
||||
After you enter your domain, we’ll make sure it’s available and that it meets some of the naming requirements.
|
||||
If your domain passes these initial checks, we’ll verify that it meets all the requirements after you complete the rest of this form.
|
||||
</p>
|
||||
{% with attr_aria_labelledby="domain_instructions domain_instructions2" attr_aria_describedby="id_dotgov_domain-requested_domain--toast" %}
|
||||
{# attr_validate / validate="domain" invokes code in getgov.min.js #}
|
||||
|
@ -120,7 +119,7 @@
|
|||
<p id="dotgov-domain-naming-requirements" class="margin-top-05">
|
||||
OMB will review each request against the domain
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://get.gov/domains/executive-branch-guidance/">
|
||||
naming requirements for executive branch agencies.</a> Agency submissions are expected to meet each requirement.
|
||||
naming requirements for executive branch agencies</a>. Agency submissions are expected to meet each requirement.
|
||||
</p>
|
||||
<p class="usa-label margin-top-0 margin-bottom-0">
|
||||
<em>Select one. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
|
@ -132,7 +131,7 @@
|
|||
{# Conditional Details Field – only shown when the executive naming requirements radio is "False" #}
|
||||
<div id="domain-naming-requirements-details-container" class="conditional-panel" style="display: none;">
|
||||
<p class="margin-bottom-3 margin-top-3">
|
||||
<em>Provide details below. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
<em>Provide details on why your submission does not meet each domain naming requirement. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_label_class="usa-sr-only" attr_required="required" maxlength="2000" %}
|
||||
{% input_with_errors forms.3.feb_naming_requirements_details %}
|
||||
|
|
|
@ -2,8 +2,17 @@
|
|||
{% load field_helpers url_helpers %}
|
||||
|
||||
{% block form_instructions %}
|
||||
<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>
|
||||
<h4>Compliance with the 21st Century IDEA is required</h4>
|
||||
<p>As required by the DOTGOV Act, agencies must ensure that any website or digital service that uses a .gov domain
|
||||
name is in compliance with the
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://digital.gov/resources/delivering-digital-first-public-experience/">
|
||||
21st Century Integrated Digital Experience Act
|
||||
</a>
|
||||
and implementation guidance,
|
||||
<a class="usa-link" rel="noopener noreferrer" target="_blank" href="https://whitehouse.gov/wp-content/uploads/2023/09/M-23-22-Delivering-a-Digital-First-Public-Experience.pdf">
|
||||
M-23-22, Delivering a Digital-First Public Experience
|
||||
</a>.
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_required_fields_help_text %}
|
||||
|
@ -34,28 +43,6 @@
|
|||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="usa-fieldset margin-top-2">
|
||||
{{forms.2.management_form}}
|
||||
{{forms.3.management_form}}
|
||||
<legend>
|
||||
<h2>Do you have a target time frame for launching this domain?</h2>
|
||||
</legend>
|
||||
<p class="margin-bottom-0 margin-top-1">
|
||||
<em>Select one. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.2.has_timeframe %}
|
||||
{% endwith %}
|
||||
|
||||
<div id="purpose-timeframe-details-container" class="conditional-panel">
|
||||
<p class="margin-bottom-3 margin-top-3">
|
||||
<em>Provide details on your target time frame. Is there special significance of this day (legal requirement, announcement, event, etc.)? <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_label_class="usa-sr-only" attr_required="required" attr_maxlength="2000" %}
|
||||
{% input_with_errors forms.3.time_frame_details %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="usa-fieldset margin-top-2" aria-labelledby="interagency-initiative-question">
|
||||
{{forms.4.management_form}}
|
||||
{{forms.5.management_form}}
|
||||
|
@ -71,13 +58,35 @@
|
|||
|
||||
<div id="purpose-interagency-initaitive-details-container" class="conditional-panel">
|
||||
<p class="margin-bottom-3 margin-top-3">
|
||||
<em>Name the agencies that will be involved in this initiative. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
<em>Describe the nature of the interagency engagement, including the names of the agencies that are involved and their role(s) in this initiative. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_label_class="usa-sr-only" attr_required="required" attr_maxlength="2000" %}
|
||||
{% input_with_errors forms.5.interagency_initiative_details %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="usa-fieldset margin-top-2">
|
||||
{{forms.2.management_form}}
|
||||
{{forms.3.management_form}}
|
||||
<legend>
|
||||
<h2>Do you have a target time frame for launching this domain?</h2>
|
||||
</legend>
|
||||
<p class="margin-bottom-0 margin-top-1">
|
||||
<em>Select one. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.2.has_timeframe %}
|
||||
{% endwith %}
|
||||
|
||||
<div id="purpose-timeframe-details-container" class="conditional-panel">
|
||||
<p class="margin-bottom-3 margin-top-3">
|
||||
<em>Provide information about the context for the launch. Include any dates, events, or announcements that are planned. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_label_class="usa-sr-only" attr_required="required" attr_maxlength="2000" %}
|
||||
{% input_with_errors forms.3.time_frame_details %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
{% else %}
|
||||
<h2>What is the purpose of your requested domain?</h2>
|
||||
<p>Describe how you’ll use your .gov domain. Will it be used for a website, email, or something else?</p>
|
||||
|
|
|
@ -70,14 +70,6 @@
|
|||
</ul>
|
||||
</p>
|
||||
|
||||
<h3>Compliance with the 21st Century IDEA Act is required</h3>
|
||||
<p>As required by the DOTGOV Act, agencies must ensure
|
||||
that any website or digital service that uses a .gov
|
||||
domain name is in compliance with the
|
||||
<a href="https://digital.gov/resources/delivering-digital-first-public-experience-act/" target="_blank" rel="noopener noreferrer">21st Century Integrated Digital Experience Act</a>
|
||||
and
|
||||
<a href="https://bidenwhitehouse.gov/wp-content/uploads/2023/09/M-23-22-Delivering-a-Digital-First-Public-Experience.pdf" target="_blank" rel="noopener noreferrer">Guidance for Agencies</a>.
|
||||
</p>
|
||||
<h2>Acknowledgement of .gov domain requirements</h2>
|
||||
{% input_with_errors forms.0.is_policy_acknowledged %}
|
||||
{% else %}
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
Requesting entity: {# if blockmakes a newline #}
|
||||
{{ domain_request|display_requesting_entity }}
|
||||
{% if domain_request.current_websites.exists %}
|
||||
Current websites: {% for site in domain_request.current_websites.all %}
|
||||
{% spaceless %}{{ site.website }}{% endspaceless %}
|
||||
{% endfor %}{% endif %}
|
||||
.gov domain:
|
||||
{{ domain_request.requested_domain.name }}
|
||||
{% if requires_feb_questions %}
|
||||
|
@ -25,29 +21,20 @@ Purpose of your domain:
|
|||
{% if requires_feb_questions %}
|
||||
{{ purpose_label }}
|
||||
{{ domain_request.purpose }}
|
||||
Target time frame:
|
||||
{% if domain_request.has_target_time_frame %}
|
||||
{{ domain_request.time_frame_details }}
|
||||
{% else %}
|
||||
No
|
||||
{% endif %}
|
||||
Interagency initiative:
|
||||
{% if domain_request.is_interagency_initiative %}
|
||||
{{ domain_request.interagency_initiative_details }}
|
||||
{% else %}
|
||||
No
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ domain_request.purpose }}
|
||||
{% endif %}
|
||||
{% if requires_feb_questions %}
|
||||
EOP contact:
|
||||
{% if domain_request.working_with_eop %}
|
||||
{{ domain_request.eop_contact.first_name }} {{ domain_request.eop_contact.last_name }}
|
||||
{{ domain_request.eop_contact.email }}
|
||||
Target time frame:
|
||||
{% if domain_request.has_target_time_frame %}
|
||||
{{ domain_request.time_frame_details }}
|
||||
{% else %}
|
||||
No
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ domain_request.purpose }}
|
||||
{% endif %}
|
||||
{% if domain_request.anything_else %}
|
||||
Additional details:
|
||||
|
|
|
@ -28,18 +28,6 @@
|
|||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if step == Step.CURRENT_SITES %}
|
||||
{% if domain_request.current_websites.all %}
|
||||
{% with title=form_titles|get_item:step value=domain_request.current_websites.all %}
|
||||
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url list='true' %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% with title=form_titles|get_item:step value='None' %}
|
||||
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if step == Step.DOTGOV_DOMAIN %}
|
||||
{% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"<span class='text-bold text-secondary-dark'>Incomplete</span>"|safe%}
|
||||
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
||||
|
@ -78,14 +66,6 @@
|
|||
{% else %}
|
||||
<p class="margin-y-0"><span class='text-bold text-secondary-dark'>Incomplete</span></p>
|
||||
{% endif %}
|
||||
<h4 class="margin-bottom-0">Target time frame</h4>
|
||||
{% if domain_request.has_timeframe is None %}
|
||||
<p class="margin-y-0"><span class='text-bold text-secondary-dark'>Incomplete</span></p>
|
||||
{% elif domain_request.has_timeframe %}
|
||||
<p class="margin-y-0">{{domain_request.time_frame_details}}</p>
|
||||
{% else %}
|
||||
<p class="margin-y-0">No</p>
|
||||
{% endif %}
|
||||
<h4 class="margin-bottom-0">Interagency initiative</h4>
|
||||
{% if domain_request.is_interagency_initiative is None %}
|
||||
<p class="margin-y-0"><span class='text-bold text-secondary-dark'>Incomplete</span></p>
|
||||
|
@ -94,6 +74,14 @@
|
|||
{% else %}
|
||||
<p class="margin-y-0">No</p>
|
||||
{% endif %}
|
||||
<h4 class="margin-bottom-0">Target time frame</h4>
|
||||
{% if domain_request.has_timeframe is None %}
|
||||
<p class="margin-y-0"><span class='text-bold text-secondary-dark'>Incomplete</span></p>
|
||||
{% elif domain_request.has_timeframe %}
|
||||
<p class="margin-y-0">{{domain_request.time_frame_details}}</p>
|
||||
{% else %}
|
||||
<p class="margin-y-0">No</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% with title=form_titles|get_item:step value=domain_request.purpose|default:"<span class='text-bold text-secondary-dark'>Incomplete</span>"|safe %}
|
||||
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
||||
|
@ -106,14 +94,6 @@
|
|||
{% with title=form_titles|get_item:step %}
|
||||
{% include "includes/summary_item.html" with title=title value=" " heading_level=heading_level editable=is_editable edit_link=domain_request_url %}
|
||||
{% endwith %}
|
||||
<h4 class="margin-bottom-0">EOP contact</h4>
|
||||
{% if domain_request.working_with_eop is None %}
|
||||
<p class="margin-y-0"><span class='text-bold text-secondary-dark'>Incomplete</span></p>
|
||||
{% elif domain_request.working_with_eop %}
|
||||
<p class="margin-y-0">{{domain_request.eop_stakeholder_first_name}} {{domain_request.eop_stakeholder_last_name}}</p>
|
||||
{% else %}
|
||||
<p class="margin-y-0">No</p>
|
||||
{% endif %}
|
||||
<h4 class="margin-bottom-0">Anything else</h4>
|
||||
{% if domain_request.anything_else %}
|
||||
<p class="margin-y-0">{{domain_request.anything_else}}</p>
|
||||
|
|
|
@ -8,38 +8,17 @@
|
|||
{% block form_fields %}
|
||||
{% include "includes/required_fields.html" %}
|
||||
{% if requires_feb_questions %}
|
||||
<fieldset class="usa-fieldset">
|
||||
|
||||
<fieldset class="usa-fieldset" aria-labelledby="anything-else-question">
|
||||
{{forms.0.management_form}}
|
||||
{{forms.1.management_form}}
|
||||
<h2 id="working-with-eop--question" class="margin-top-0 margin-bottom-0">Are you working with someone in the Executive Office of the President (EOP) on this request?</h2>
|
||||
<p id="working-with-eop--requirement" class="margin-bottom-2 margin-top-2">Working with the EOP is not required to request a .gov domain.</p>
|
||||
<p class="margin-bottom-0 margin-top-1">
|
||||
<em>Select one. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" add_aria_describedby="working-with-eop--requirement" add_legend_heading="Are you working with someone in the Executive Office of the President (EOP) on this request?" %}
|
||||
{% input_with_errors forms.0.working_with_eop %}
|
||||
{% endwith %}
|
||||
|
||||
<div id="eop-contact-container" class="conditional-panel display-none">
|
||||
<p class="margin-bottom-3 margin-top-3">
|
||||
<em>Provide the name of the person you're working with. <span class="usa-label--required">*</span></em>
|
||||
</p>
|
||||
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.1.first_name %}
|
||||
{% input_with_errors forms.1.last_name %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="usa-fieldset" aria-labelledby="anything-else-question">
|
||||
{{forms.2.management_form}}
|
||||
{{forms.3.management_form}}
|
||||
<h2 id="anything-else-question">Is there anything else you'd like us to know about your domain request?</h2>
|
||||
<p>Describe any additional information that would assist in the review of your request. If you are working with someone in the Executive Office of the President on this request, please describe below.</p>
|
||||
<p class="margin-bottom-0 margin-top-1">
|
||||
<em>Select one. <abbr class="usa-hint usa-hint--required" title="required">*</abbr></em>
|
||||
</p>
|
||||
{% with add_class="usa-radio__input--tile" add_legend_class="usa-sr-only" add_legend_heading="Is there anything else you'd like us to know about your domain request?"%}
|
||||
{% input_with_errors forms.2.has_anything_else_text %}
|
||||
{% input_with_errors forms.0.has_anything_else_text %}
|
||||
{% endwith %}
|
||||
|
||||
<div id="anything-else-details-container" class="conditional-panel display-none">
|
||||
|
@ -47,7 +26,7 @@
|
|||
<em>Provide details below. <span class="usa-label--required">*</span></em>
|
||||
</p>
|
||||
{% with add_label_class="usa-sr-only" attr_required="required" attr_maxlength="2000" %}
|
||||
{% input_with_errors forms.3.anything_else %}
|
||||
{% input_with_errors forms.1.anything_else %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -60,7 +39,7 @@
|
|||
<div id="anything-else">
|
||||
<p><em>This question is optional.</em></p>
|
||||
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.3.anything_else %}
|
||||
{% input_with_errors forms.1.anything_else %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -2061,9 +2061,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"feb_naming_requirements",
|
||||
"feb_naming_requirements_details",
|
||||
"feb_purpose_choice",
|
||||
"working_with_eop",
|
||||
"eop_stakeholder_first_name",
|
||||
"eop_stakeholder_last_name",
|
||||
"purpose",
|
||||
"has_timeframe",
|
||||
"time_frame_details",
|
||||
|
|
|
@ -3456,7 +3456,7 @@ class TestRequestingEntity(WebTest):
|
|||
response = form.submit().follow()
|
||||
|
||||
# Verify successful submission by checking we're on the next page
|
||||
self.assertContains(response, "Current websites")
|
||||
self.assertContains(response, ".gov domain")
|
||||
|
||||
@override_flag("organization_feature", active=True)
|
||||
@override_flag("organization_requests", active=True)
|
||||
|
@ -3513,7 +3513,7 @@ class TestRequestingEntity(WebTest):
|
|||
response = form.submit().follow()
|
||||
|
||||
# Ensure that the post occurred successfully by checking that we're on the following page.
|
||||
self.assertContains(response, "Current websites")
|
||||
self.assertContains(response, ".gov domain")
|
||||
created_domain_request_exists = DomainRequest.objects.filter(
|
||||
organization_name__isnull=True, sub_organization=self.suborganization
|
||||
).exists()
|
||||
|
@ -3549,7 +3549,7 @@ class TestRequestingEntity(WebTest):
|
|||
response = form.submit().follow()
|
||||
|
||||
# Ensure that the post occurred successfully by checking that we're on the following page.
|
||||
self.assertContains(response, "Current websites")
|
||||
self.assertContains(response, ".gov domain")
|
||||
created_domain_request_exists = DomainRequest.objects.filter(
|
||||
organization_name__isnull=True,
|
||||
sub_organization__isnull=True,
|
||||
|
@ -3584,7 +3584,7 @@ class TestRequestingEntity(WebTest):
|
|||
response = form.submit().follow()
|
||||
|
||||
# Ensure that the post occurred successfully by checking that we're on the following page.
|
||||
self.assertContains(response, "Current websites")
|
||||
self.assertContains(response, ".gov domain")
|
||||
created_domain_request_exists = DomainRequest.objects.filter(
|
||||
organization_name=self.portfolio.organization_name,
|
||||
).exists()
|
||||
|
|
|
@ -2594,20 +2594,9 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
requesting_entity_result = requesting_entity_form.submit()
|
||||
|
||||
# ---- CURRENT SITES PAGE ----
|
||||
# Follow the redirect to the next form page
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
current_sites_page = requesting_entity_result.follow()
|
||||
current_sites_form = current_sites_page.forms[0]
|
||||
current_sites_form["current_sites-0-website"] = "www.treasury.com"
|
||||
|
||||
# test saving the page
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
current_sites_result = current_sites_form.submit()
|
||||
|
||||
# ---- DOTGOV DOMAIN PAGE ----
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
dotgov_page = current_sites_result.follow()
|
||||
dotgov_page = requesting_entity_result.follow()
|
||||
|
||||
# separate out these tests for readability
|
||||
self.feb_dotgov_domain_tests(dotgov_page)
|
||||
|
@ -2645,9 +2634,6 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.feb_additional_details_page_tests(additional_details_page)
|
||||
|
||||
additional_details_form = additional_details_page.forms[0]
|
||||
additional_details_form["portfolio_additional_details-working_with_eop"] = "True"
|
||||
additional_details_form["portfolio_additional_details-first_name"] = "TesterFirstName"
|
||||
additional_details_form["portfolio_additional_details-last_name"] = "TesterLastName"
|
||||
additional_details_form["portfolio_additional_details-has_anything_else_text"] = "True"
|
||||
additional_details_form["portfolio_additional_details-anything_else"] = "test"
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
|
@ -2669,6 +2655,13 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.feb_review_page_tests(review_page)
|
||||
|
||||
def feb_purpose_page_tests(self, purpose_page):
|
||||
# Check for the 21st Century IDEA Act links
|
||||
self.assertContains(purpose_page, "https://digital.gov/resources/delivering-digital-first-public-experience/")
|
||||
self.assertContains(
|
||||
purpose_page,
|
||||
"https://whitehouse.gov/wp-content/uploads/2023/09/M-23-22-Delivering-a-Digital-First-Public-Experience.pdf", # noqa
|
||||
)
|
||||
|
||||
self.assertContains(purpose_page, "What is the purpose of your requested domain?")
|
||||
|
||||
# Make sure the purpose selector form is present
|
||||
|
@ -2700,7 +2693,7 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.assertContains(dotgov_page, "Does this submission meet each domain naming requirement?")
|
||||
|
||||
# Check for label of second FEB form
|
||||
self.assertContains(dotgov_page, "Provide details below")
|
||||
self.assertContains(dotgov_page, "Provide details")
|
||||
|
||||
# Check that the yes/no form was included
|
||||
self.assertContains(dotgov_page, "feb_naming_requirements")
|
||||
|
@ -2709,36 +2702,18 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.assertContains(dotgov_page, "feb_naming_requirements_details")
|
||||
|
||||
def feb_additional_details_page_tests(self, additional_details_page):
|
||||
test_text = "Are you working with someone in the Executive Office of the President (EOP) on this request?"
|
||||
self.assertContains(additional_details_page, test_text)
|
||||
|
||||
# Make sure the EOP form is present
|
||||
self.assertContains(additional_details_page, "working_with_eop")
|
||||
|
||||
# Make sure the EOP contact form is present
|
||||
self.assertContains(additional_details_page, "eop-contact-container")
|
||||
self.assertContains(additional_details_page, "additional_details-first_name")
|
||||
self.assertContains(additional_details_page, "additional_details-last_name")
|
||||
|
||||
# Make sure the additional details form is present
|
||||
self.assertContains(additional_details_page, "additional_details-has_anything_else_text")
|
||||
self.assertContains(additional_details_page, "additional_details-anything_else")
|
||||
|
||||
def feb_requirements_page_tests(self, requirements_page):
|
||||
# Check for the 21st Century IDEA Act links
|
||||
self.assertContains(
|
||||
requirements_page, "https://digital.gov/resources/delivering-digital-first-public-experience-act/"
|
||||
)
|
||||
self.assertContains(
|
||||
requirements_page,
|
||||
"https://bidenwhitehouse.gov/wp-content/uploads/2023/09/M-23-22-Delivering-a-Digital-First-Public-Experience.pdf", # noqa
|
||||
)
|
||||
|
||||
# Check for the policy acknowledgement form
|
||||
self.assertContains(requirements_page, "is_policy_acknowledged")
|
||||
self.assertContains(
|
||||
requirements_page,
|
||||
"I read and understand the guidance outlined in the DOTGOV Act for operating a .gov domain.",
|
||||
"I read and agree to the requirements for operating a .gov domain.",
|
||||
)
|
||||
|
||||
def feb_review_page_tests(self, review_page):
|
||||
|
@ -2748,7 +2723,7 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.assertContains(review_page, "Because this is a test")
|
||||
# Purpose
|
||||
self.assertContains(review_page, "Purpose")
|
||||
self.assertContains(review_page, "Used as a redirect for an existing website")
|
||||
self.assertContains(review_page, "Used as a redirect for an existing or new website")
|
||||
self.assertContains(review_page, "testPurpose123")
|
||||
# Target time frame
|
||||
self.assertContains(review_page, "Target time frame")
|
||||
|
@ -2756,9 +2731,6 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
# Interagency initiative
|
||||
self.assertContains(review_page, "Interagency initiative")
|
||||
self.assertContains(review_page, "FakeInteragencyInitiative")
|
||||
# EOP contact
|
||||
self.assertContains(review_page, "EOP contact")
|
||||
self.assertContains(review_page, "TesterFirstName TesterLastName")
|
||||
|
||||
@less_console_noise_decorator
|
||||
def test_domain_request_formsets(self):
|
||||
|
@ -3448,7 +3420,7 @@ class TestDomainRequestWizard(TestWithUser, WebTest):
|
|||
self.assertContains(detail_page, portfolio.organization_name)
|
||||
|
||||
# We should only see one unlocked step
|
||||
self.assertContains(detail_page, "#check_circle", count=4)
|
||||
self.assertContains(detail_page, "#check_circle", count=3)
|
||||
|
||||
# One pages should still be locked (additional details)
|
||||
self.assertContains(detail_page, "#lock", 1)
|
||||
|
|
|
@ -1846,12 +1846,6 @@ class DomainRequestExport(BaseExport):
|
|||
purpose_type_display = (
|
||||
DomainRequest.FEBPurposeChoices.get_purpose_label(purpose_type) if purpose_type else "N/A"
|
||||
)
|
||||
eop_stakeholder_first_name = model.get("eop_stakeholder_first_name")
|
||||
eop_stakeholder_last_name = model.get("eop_stakeholder_last_name")
|
||||
if not eop_stakeholder_first_name or not eop_stakeholder_last_name:
|
||||
eop_stakeholder_name = None
|
||||
else:
|
||||
eop_stakeholder_name = f"{eop_stakeholder_first_name} {eop_stakeholder_last_name}"
|
||||
|
||||
# create a dictionary of fields which can be included in output.
|
||||
# "extra_fields" are precomputed fields (generated in the DB or parsed).
|
||||
|
@ -1899,7 +1893,6 @@ class DomainRequestExport(BaseExport):
|
|||
"Domain name rationale": model.get("feb_naming_requirements_details", None),
|
||||
"Target time frame": model.get("time_frame_details", None),
|
||||
"Interagency initiative": model.get("interagency_initiative_details", None),
|
||||
"EOP stakeholder name": eop_stakeholder_name,
|
||||
}
|
||||
|
||||
row = [FIELDS.get(column, "") for column in columns]
|
||||
|
@ -1949,8 +1942,6 @@ class DomainRequestDataType(DomainRequestExport):
|
|||
"Domain name rationale",
|
||||
"Target time frame",
|
||||
"Interagency initiative",
|
||||
"EOP stakeholder name",
|
||||
"EOP stakeholder email",
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
@ -2099,8 +2090,6 @@ class DomainRequestDataFull(DomainRequestExport):
|
|||
"Domain name rationale",
|
||||
"Target time frame",
|
||||
"Interagency initiative",
|
||||
"EOP stakeholder name",
|
||||
"EOP stakeholder email",
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -100,7 +100,6 @@ class PortfolioDomainRequestStep(StrEnum):
|
|||
# By default, these will redirect to the normal request flow views.
|
||||
# After creating a new view, you will need to add this to urls.py.
|
||||
REQUESTING_ENTITY = "portfolio_requesting_entity"
|
||||
CURRENT_SITES = "current_sites"
|
||||
DOTGOV_DOMAIN = "dotgov_domain"
|
||||
PURPOSE = "purpose"
|
||||
ADDITIONAL_DETAILS = "portfolio_additional_details"
|
||||
|
|
|
@ -83,7 +83,6 @@ class DomainRequestWizard(TemplateView):
|
|||
# Titles for the portfolio context
|
||||
PORTFOLIO_TITLES = {
|
||||
PortfolioDomainRequestStep.REQUESTING_ENTITY: _("Requesting entity"),
|
||||
PortfolioDomainRequestStep.CURRENT_SITES: _("Current websites"),
|
||||
PortfolioDomainRequestStep.DOTGOV_DOMAIN: _(".gov domain"),
|
||||
PortfolioDomainRequestStep.PURPOSE: _("Purpose of your domain"),
|
||||
PortfolioDomainRequestStep.ADDITIONAL_DETAILS: _("Additional details"),
|
||||
|
@ -134,9 +133,6 @@ class DomainRequestWizard(TemplateView):
|
|||
|
||||
PORTFOLIO_UNLOCKING_STEPS = {
|
||||
PortfolioDomainRequestStep.REQUESTING_ENTITY: lambda w: w.from_model("unlock_requesting_entity", False),
|
||||
PortfolioDomainRequestStep.CURRENT_SITES: lambda self: (
|
||||
self.domain_request.current_websites.exists() or self.from_model("unlock_requesting_entity", False)
|
||||
),
|
||||
PortfolioDomainRequestStep.DOTGOV_DOMAIN: lambda self: self.domain_request.requested_domain is not None,
|
||||
PortfolioDomainRequestStep.PURPOSE: lambda self: self.domain_request.purpose is not None,
|
||||
PortfolioDomainRequestStep.ADDITIONAL_DETAILS: lambda self: self.domain_request.anything_else is not None,
|
||||
|
@ -615,8 +611,6 @@ class PortfolioAdditionalDetails(DomainRequestWizard):
|
|||
template_name = "portfolio_domain_request_additional_details.html"
|
||||
|
||||
forms = [
|
||||
feb.WorkingWithEOPYesNoForm,
|
||||
feb.EOPContactForm,
|
||||
feb.FEBAnythingElseYesNoForm,
|
||||
forms.PortfolioAnythingElseForm,
|
||||
]
|
||||
|
@ -631,37 +625,29 @@ class PortfolioAdditionalDetails(DomainRequestWizard):
|
|||
Validates the forms for portfolio additional details.
|
||||
|
||||
Expected order of forms_list:
|
||||
0: WorkingWithEOPYesNoForm
|
||||
1: EOPContactForm
|
||||
2: FEBAnythingElseYesNoForm
|
||||
3: PortfolioAnythingElseForm
|
||||
0: FEBAnythingElseYesNoForm
|
||||
1: PortfolioAnythingElseForm
|
||||
"""
|
||||
feb_anything_else_yes_no_form = forms[0]
|
||||
portfolio_anything_else_form = forms[1]
|
||||
|
||||
if not self.requires_feb_questions():
|
||||
for i in range(3):
|
||||
for i in range(1):
|
||||
forms[i].mark_form_for_deletion()
|
||||
# If FEB questions aren't required, validate only the anything else form
|
||||
return forms[3].is_valid()
|
||||
eop_forms_valid = True
|
||||
if not forms[0].is_valid():
|
||||
# If the user isn't working with EOP, don't validate the EOP contact form
|
||||
forms[1].mark_form_for_deletion()
|
||||
eop_forms_valid = False
|
||||
if forms[0].cleaned_data.get("working_with_eop"):
|
||||
eop_forms_valid = forms[1].is_valid()
|
||||
else:
|
||||
forms[1].mark_form_for_deletion()
|
||||
return feb_anything_else_yes_no_form.is_valid()
|
||||
anything_else_forms_valid = True
|
||||
if not forms[2].is_valid():
|
||||
forms[3].mark_form_for_deletion()
|
||||
if not portfolio_anything_else_form.is_valid():
|
||||
feb_anything_else_yes_no_form.mark_form_for_deletion()
|
||||
anything_else_forms_valid = False
|
||||
if forms[2].cleaned_data.get("has_anything_else_text"):
|
||||
forms[3].fields["anything_else"].required = True
|
||||
forms[3].fields["anything_else"].error_messages[
|
||||
if portfolio_anything_else_form.cleaned_data.get("has_anything_else_text"):
|
||||
feb_anything_else_yes_no_form.fields["anything_else"].required = True
|
||||
feb_anything_else_yes_no_form.fields["anything_else"].error_messages[
|
||||
"required"
|
||||
] = "Please provide additional details you'd like us to know. \
|
||||
If you have nothing to add, select 'No'."
|
||||
anything_else_forms_valid = forms[3].is_valid()
|
||||
return eop_forms_valid and anything_else_forms_valid
|
||||
anything_else_forms_valid = feb_anything_else_yes_no_form.is_valid()
|
||||
return anything_else_forms_valid
|
||||
|
||||
|
||||
# Non-portfolio pages
|
||||
|
@ -957,14 +943,9 @@ class Requirements(DomainRequestWizard):
|
|||
# Pass the is_federal context to the form
|
||||
for form in forms_list:
|
||||
if isinstance(form, forms.RequirementsForm):
|
||||
if self.requires_feb_questions():
|
||||
form.fields["is_policy_acknowledged"].label = (
|
||||
"I read and understand the guidance outlined in the DOTGOV Act for operating a .gov domain." # noqa: E501
|
||||
)
|
||||
else:
|
||||
form.fields["is_policy_acknowledged"].label = (
|
||||
"I read and agree to the requirements for operating a .gov domain." # noqa: E501
|
||||
)
|
||||
form.fields["is_policy_acknowledged"].label = (
|
||||
"I read and agree to the requirements for operating a .gov domain." # noqa: E501
|
||||
)
|
||||
|
||||
return forms_list
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue