diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index e760037f1..7bc7dc53c 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -913,3 +913,11 @@ ul.add-list-reset { .dl-dja dt { font-size: 14px; } + +.domain-name-wrap { + white-space: normal; + word-wrap: break-word; + overflow: visible; + word-break: break-all; + max-width: 100%; + } \ No newline at end of file diff --git a/src/registrar/assets/sass/_theme/_alerts.scss b/src/registrar/assets/sass/_theme/_alerts.scss index 163f243d3..08404232e 100644 --- a/src/registrar/assets/sass/_theme/_alerts.scss +++ b/src/registrar/assets/sass/_theme/_alerts.scss @@ -1,3 +1,5 @@ +@use "base" as *; + // Fixes some font size disparities with the Figma // for usa-alert alert elements .usa-alert { @@ -22,3 +24,8 @@ margin-left: 0.5rem!important; } } + +// NOTE: !important is used because _font.scss overrides this +.usa-alert__body--widescreen { + max-width: $widescreen-max-width !important; +} diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index 9d2ed4177..85f453dac 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -1,6 +1,8 @@ @use "uswds-core" as *; @use "cisa_colors" as *; +$widescreen-max-width: 1920px; + /* Styles for making visible to screen reader / AT users only. */ .sr-only { @include sr-only; @@ -102,6 +104,24 @@ body { } } +/* +This is a hack to keep the "Export" button on Domain Requests page inline +with the searchbar in widescreen mode. + +EXPLANATION: The existing frontend implementation puts the searchbar and export +button in two separate columns in a grid, which creates a solid wrap-around effect +for mobile devices. The searchbar had a max-width that exactly equaled the max width +of its parent column (for non-widescreens), so there wasn't any issue at this time of +implementation. +However, during immplementation of widescreen mode this small max-width caused the searchbar to +no longer fill its parent grid column for larger screen sizes, creating a visual gap between +it and the adjacent export button. To fix this, we will limit the width of the first +grid column to the max-width of the searchbar, which was calculated to be 33rem. +*/ +.section-outlined__search--widescreen { + max-width: 33rem; +} + .break-word { word-break: break-word; } @@ -222,6 +242,14 @@ abbr[title] { left: auto!important; } +.usa-banner__inner--widescreen { + max-width: $widescreen-max-width; +} + +.margin-right-neg-4px { + margin-right: -4px; +} + .break-word { word-break: break-word; } diff --git a/src/registrar/assets/sass/_theme/_containers.scss b/src/registrar/assets/sass/_theme/_containers.scss new file mode 100644 index 000000000..7473615ad --- /dev/null +++ b/src/registrar/assets/sass/_theme/_containers.scss @@ -0,0 +1,8 @@ +@use "uswds-core" as *; +@use "base" as *; + +//NOTE: !important is needed because it gets overriden by other .scss for footer nav +.grid-container--widescreen, +.usa-identifier__container--widescreen { + max-width: $widescreen-max-width !important; +} diff --git a/src/registrar/assets/sass/_theme/_header.scss b/src/registrar/assets/sass/_theme/_header.scss index d79774d98..53eab90d8 100644 --- a/src/registrar/assets/sass/_theme/_header.scss +++ b/src/registrar/assets/sass/_theme/_header.scss @@ -1,5 +1,6 @@ @use "uswds-core" as *; @use "cisa_colors" as *; +@use "base" as *; // Define some styles for the .gov header/logo .usa-logo button { @@ -127,3 +128,9 @@ } } } + +.usa-nav__inner--widescreen, +.usa-navbar--widescreen, +.usa-nav-container--widescreen { + max-width: $widescreen-max-width !important; +} diff --git a/src/registrar/assets/sass/_theme/styles.scss b/src/registrar/assets/sass/_theme/styles.scss index 5616b7509..8c38ae0b4 100644 --- a/src/registrar/assets/sass/_theme/styles.scss +++ b/src/registrar/assets/sass/_theme/styles.scss @@ -23,6 +23,7 @@ @forward "identifier"; @forward "header"; @forward "register-form"; +@forward "containers"; /*-------------------------------------------------- --- Admin ---------------------------------*/ diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index 03d9e38c6..9eb649ad8 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -246,6 +246,7 @@ TEMPLATES = [ "registrar.context_processors.org_user_status", "registrar.context_processors.add_path_to_context", "registrar.context_processors.portfolio_permissions", + "registrar.context_processors.is_widescreen_mode", ], }, }, diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py index 4c922ccbd..76c77955f 100644 --- a/src/registrar/config/urls.py +++ b/src/registrar/config/urls.py @@ -175,6 +175,11 @@ urlpatterns = [ views.DomainRequestStatus.as_view(), name="domain-request-status", ), + path( + "domain-request/viewonly/", + views.PortfolioDomainRequestStatusViewOnly.as_view(), + name="domain-request-status-viewonly", + ), path( "domain-request//withdraw", views.DomainRequestWithdrawConfirmation.as_view(), diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 3ceb25af1..c62c9a7c4 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -94,3 +94,8 @@ def portfolio_permissions(request): except AttributeError: # Handles cases where request.user might not exist return portfolio_context + + +def is_widescreen_mode(request): + widescreen_paths = ["/domains/", "/requests/"] + return {"is_widescreen_mode": any(path in request.path for path in widescreen_paths) or request.path == "/"} diff --git a/src/registrar/forms/utility/wizard_form_helper.py b/src/registrar/forms/utility/wizard_form_helper.py index 2ae50f908..ba3c37e1e 100644 --- a/src/registrar/forms/utility/wizard_form_helper.py +++ b/src/registrar/forms/utility/wizard_form_helper.py @@ -4,7 +4,6 @@ from itertools import zip_longest from typing import Callable from django.db.models.fields.related import ForeignObjectRel from django import forms - from registrar.models import DomainRequest, Contact @@ -278,3 +277,15 @@ class BaseYesNoForm(RegistrarForm): # No pre-selection for new domain requests initial_value = self.form_is_checked if self.domain_request else None return initial_value + + +def request_step_list(request_wizard): + """Dynamically generated list of steps in the form wizard.""" + step_list = [] + for step in request_wizard.StepEnum: + condition = request_wizard.WIZARD_CONDITIONS.get(step, True) + if callable(condition): + condition = condition(request_wizard) + if condition: + step_list.append(step) + return step_list diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index 161d85ae5..bb8693ac1 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -583,6 +583,10 @@ class DomainRequest(TimeStampedModel): blank=True, ) + def is_awaiting_review(self) -> bool: + """Checks if the current status is in submitted or in_review""" + return self.status in [self.DomainRequestStatus.SUBMITTED, self.DomainRequestStatus.IN_REVIEW] + def get_first_status_set_date(self, status): """Returns the date when the domain request was first set to the given status.""" log_entry = ( @@ -1001,6 +1005,17 @@ class DomainRequest(TimeStampedModel): send_email=send_email, ) + def is_withdrawable(self): + """Helper function that determines if the request can be withdrawn in its current status""" + # This list is equivalent to the source field on withdraw. We need a better way to + # consolidate these two lists - i.e. some sort of method that keeps these two lists in sync. + # django fsm is very picky with what we can define in that field. + return self.status in [ + self.DomainRequestStatus.SUBMITTED, + self.DomainRequestStatus.IN_REVIEW, + self.DomainRequestStatus.ACTION_NEEDED, + ] + @transition( field="status", source=[DomainRequestStatus.SUBMITTED, DomainRequestStatus.IN_REVIEW, DomainRequestStatus.ACTION_NEEDED], diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 929a63525..ae76d648b 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -3,7 +3,6 @@ import logging from django.contrib.auth.models import AbstractUser from django.db import models from django.db.models import Q -from django.http import HttpRequest from registrar.models import DomainInformation, UserDomainRole from registrar.models.utility.portfolio_helper import UserPortfolioPermissionChoices @@ -14,6 +13,7 @@ from .transition_domain import TransitionDomain from .verified_by_staff import VerifiedByStaff from .domain import Domain from .domain_request import DomainRequest +from registrar.utility.waffle import flag_is_active_for_user from waffle.decorators import flag_is_active from phonenumber_field.modelfields import PhoneNumberField # type: ignore @@ -204,14 +204,10 @@ class User(AbstractUser): ) or self._has_portfolio_permission(portfolio, UserPortfolioPermissionChoices.VIEW_MANAGED_DOMAINS) def has_organization_requests_flag(self): - request = HttpRequest() - request.user = self - return flag_is_active(request, "organization_requests") + return flag_is_active_for_user(self, "organization_requests") def has_organization_members_flag(self): - request = HttpRequest() - request.user = self - return flag_is_active(request, "organization_members") + return flag_is_active_for_user(self, "organization_members") def has_view_members_portfolio_permission(self, portfolio): # BEGIN @@ -422,12 +418,8 @@ class User(AbstractUser): for invitation in PortfolioInvitation.objects.filter( email__iexact=self.email, status=PortfolioInvitation.PortfolioInvitationStatus.INVITED ): - # need to create a bogus request and assign user to it, in order to pass request - # to flag_is_active - request = HttpRequest() - request.user = self only_single_portfolio = ( - not flag_is_active(request, "multiple_portfolios") and self.get_first_portfolio() is None + not flag_is_active_for_user(self, "multiple_portfolios") and self.get_first_portfolio() is None ) if only_single_portfolio or flag_is_active(None, "multiple_portfolios"): try: diff --git a/src/registrar/models/user_portfolio_permission.py b/src/registrar/models/user_portfolio_permission.py index 0c2487df3..f7bafc8c6 100644 --- a/src/registrar/models/user_portfolio_permission.py +++ b/src/registrar/models/user_portfolio_permission.py @@ -1,7 +1,6 @@ from django.db import models from django.forms import ValidationError -from django.http import HttpRequest -from waffle import flag_is_active +from registrar.utility.waffle import flag_is_active_for_user from registrar.models.utility.portfolio_helper import UserPortfolioPermissionChoices, UserPortfolioRoleChoices from .utility.time_stamped_model import TimeStampedModel from django.contrib.postgres.fields import ArrayField @@ -101,11 +100,8 @@ class UserPortfolioPermission(TimeStampedModel): # Check if a user is set without accessing the related object. has_user = bool(self.user_id) if self.pk is None and has_user: - # Have to create a bogus request to set the user and pass to flag_is_active - request = HttpRequest() - request.user = self.user existing_permissions = UserPortfolioPermission.objects.filter(user=self.user) - if not flag_is_active(request, "multiple_portfolios") and existing_permissions.exists(): + if not flag_is_active_for_user(self.user, "multiple_portfolios") and existing_permissions.exists(): raise ValidationError( "Only one portfolio permission is allowed per user when multiple portfolios are disabled." ) diff --git a/src/registrar/templates/401.html b/src/registrar/templates/401.html index dd1801cc5..20ca0420e 100644 --- a/src/registrar/templates/401.html +++ b/src/registrar/templates/401.html @@ -5,7 +5,7 @@ {% block title %}{% translate "Unauthorized | " %}{% endblock %} {% block content %} -
+

diff --git a/src/registrar/templates/403.html b/src/registrar/templates/403.html index 660e5d34c..ef910a191 100644 --- a/src/registrar/templates/403.html +++ b/src/registrar/templates/403.html @@ -5,7 +5,7 @@ {% block title %}{% translate "Forbidden | " %}{% endblock %} {% block content %} -
+

diff --git a/src/registrar/templates/404.html b/src/registrar/templates/404.html index cf6983c60..024c2803b 100644 --- a/src/registrar/templates/404.html +++ b/src/registrar/templates/404.html @@ -5,7 +5,7 @@ {% block title %}{% translate "Page not found | " %}{% endblock %} {% block content %} -
+

diff --git a/src/registrar/templates/500.html b/src/registrar/templates/500.html index dfbd90142..95c17e069 100644 --- a/src/registrar/templates/500.html +++ b/src/registrar/templates/500.html @@ -5,7 +5,7 @@ {% block title %}{% translate "Server error | " %}{% endblock %} {% block content %} -
+

diff --git a/src/registrar/templates/base.html b/src/registrar/templates/base.html index e5bd1b0b9..b14dab2fa 100644 --- a/src/registrar/templates/base.html +++ b/src/registrar/templates/base.html @@ -78,7 +78,7 @@
-
+
U.S. flag
diff --git a/src/registrar/templates/domain_base.html b/src/registrar/templates/domain_base.html index b99b12740..9f7e8d2e6 100644 --- a/src/registrar/templates/domain_base.html +++ b/src/registrar/templates/domain_base.html @@ -9,7 +9,7 @@

Domain name: {{ domain.name }}

diff --git a/src/registrar/templates/domain_detail.html b/src/registrar/templates/domain_detail.html index 4b6ca6e77..dca68f6ef 100644 --- a/src/registrar/templates/domain_detail.html +++ b/src/registrar/templates/domain_detail.html @@ -5,7 +5,7 @@ {% block domain_content %} {{ block.super }}
-

{{ domain.name }}

+

{{ domain.name }}

- - {% if step == Step.ORGANIZATION_TYPE %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% if domain_request.generic_org_type is not None %} - {% with title=form_titles|get_item:step value=domain_request.get_generic_org_type_display|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% else %} - {% with title=form_titles|get_item:step value="Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - {% if step == Step.TRIBAL_GOVERNMENT %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.tribe_name|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% if domain_request.federally_recognized_tribe %}

Federally-recognized tribe

{% endif %} - {% if domain_request.state_recognized_tribe %}

State-recognized tribe

{% endif %} - {% endif %} - - - {% if step == Step.ORGANIZATION_FEDERAL %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.get_federal_type_display|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - - {% if step == Step.ORGANIZATION_ELECTION %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.is_election_board|yesno:"Yes,No,Incomplete" %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - - {% if step == Step.ORGANIZATION_CONTACT %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% if domain_request.organization_name %} - {% with title=form_titles|get_item:step value=domain_request %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url address='true' %} - {% endwith %} - {% else %} - {% with title=form_titles|get_item:step value="Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - {% if step == Step.ABOUT_YOUR_ORGANIZATION %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.about_your_organization|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - - {% if step == Step.SENIOR_OFFICIAL %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% if domain_request.senior_official is not None %} - {% with title=form_titles|get_item:step value=domain_request.senior_official %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' %} - {% endwith %} - {% else %} - {% with title=form_titles|get_item:step value="Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - {% if step == Step.CURRENT_SITES %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% 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=True 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=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - {% if step == Step.DOTGOV_DOMAIN %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete"|safe%} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - - {% if domain_request.alternative_domains.all %} -

Alternative domains

-
    - {% for site in domain_request.alternative_domains.all %} -
  • {{ site.website }}
  • - {% endfor %} -
- {% endif %} - {% endif %} - - {% if step == Step.PURPOSE %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.purpose|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - - {% if step == Step.YOUR_CONTACT %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% if domain_request.creator is not None %} - {% with title=form_titles|get_item:step value=domain_request.creator %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' %} - {% endwith %} - {% else %} - {% with title=form_titles|get_item:step value="Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - {% if step == Step.OTHER_CONTACTS %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% if domain_request.other_contacts.all %} - {% with title=form_titles|get_item:step value=domain_request.other_contacts.all %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' list='true' %} - {% endwith %} - {% else %} - {% with title=form_titles|get_item:step value=domain_request.no_other_contacts_rationale|default:"Incomplete"|safe %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - {% endif %} - - - {% if step == Step.ADDITIONAL_DETAILS %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step %} - {% if domain_request.has_additional_details %} - {% include "includes/summary_item.html" with title="Additional Details" value=" " heading_level=heading_level editable=True edit_link=domain_request_url %} -

CISA Regional Representative

-
    - {% if domain_request.cisa_representative_first_name %} -
  • {{domain_request.cisa_representative_first_name}} {{domain_request.cisa_representative_last_name}}
  • - {% if domain_request.cisa_representative_email %} -
  • {{domain_request.cisa_representative_email}}
  • - {% endif %} - {% else %} - No - {% endif %} -
- -

Anything else

-
    - {% if domain_request.anything_else %} - {{domain_request.anything_else}} - {% else %} - No - {% endif %} -
- {% else %} - {% include "includes/summary_item.html" with title="Additional Details" value="Incomplete"|safe heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endif %} - {% endwith %} - {% endif %} - - - {% if step == Step.REQUIREMENTS %} - {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." %} - {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} - {% endwith %} - {% endif %} - - - -
- {% endfor %} + {% include "includes/request_review_steps.html" with is_editable=True %} {% endblock %} diff --git a/src/registrar/templates/domain_request_status.html b/src/registrar/templates/domain_request_status.html index 460f6ae29..d332ce54e 100644 --- a/src/registrar/templates/domain_request_status.html +++ b/src/registrar/templates/domain_request_status.html @@ -1,206 +1,10 @@ {% extends 'base.html' %} - {% load custom_filters %} - -{% block title %}Domain request status | {{ DomainRequest.requested_domain.name }} | {% endblock %} {% load static url_helpers %} +{% block title %}Domain request status | {{ DomainRequest.requested_domain.name }} | {% endblock %} + + {% block content %} -
-
- {% if portfolio %} - {% url 'domain-requests' as url %} - {% else %} - {% url 'home' as url %} - {% endif %} - - -

Domain request for {{ DomainRequest.requested_domain.name }}

-
-
-

- - Status: - - {{ DomainRequest.get_status_display|default:"ERROR Please contact technical support/dev" }} -

-
-
-
- - {% with statuses=DomainRequest.DomainRequestStatus last_submitted=DomainRequest.last_submitted_date|date:"F j, Y" first_submitted=DomainRequest.first_submitted_date|date:"F j, Y" last_status_update=DomainRequest.last_status_update|date:"F j, Y" %} - {% comment %} - These are intentionally seperated this way. - There is some code repetition, but it gives us more flexibility rather than a dense reduction. - Leave it this way until we've solidified our requirements. - {% endcomment %} - {% if DomainRequest.status == statuses.STARTED %} - {% with first_started_date=DomainRequest.get_first_status_started_date|date:"F j, Y" %} -

- {% comment %} - A newly created domain request will not have a value for last_status update. - This is because the status never really updated. - However, if this somehow goes back to started we can default to displaying that new date. - {% endcomment %} - Started on: {{last_status_update|default:first_started_date}} -

- {% endwith %} - {% elif DomainRequest.status == statuses.SUBMITTED %} -

- Submitted on: {{last_submitted|default:first_submitted }} -

-

- Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} -

- {% elif DomainRequest.status == statuses.ACTION_NEEDED %} -

- Submitted on: {{last_submitted|default:first_submitted }} -

-

- Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} -

- {% elif DomainRequest.status == statuses.REJECTED %} -

- Submitted on: {{last_submitted|default:first_submitted }} -

-

- Rejected on: {{last_status_update}} -

- {% elif DomainRequest.status == statuses.WITHDRAWN %} -

- Submitted on: {{last_submitted|default:first_submitted }} -

-

- Withdrawn on: {{last_status_update}} -

- {% else %} - {% comment %} Shown for in_review, approved, ineligible {% endcomment %} -

- Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} -

- {% endif %} - - {% if DomainRequest.status != 'rejected' %} -

{% include "includes/domain_request.html" %}

-

- Withdraw request -

- {% endif %} - {% endwith %} -
- -
-

Summary of your domain request

- {% with heading_level='h3' %} - {% with org_type=DomainRequest.get_generic_org_type_display %} - {% include "includes/summary_item.html" with title='Type of organization' value=org_type heading_level=heading_level %} - {% endwith %} - - {% if DomainRequest.tribe_name %} - {% include "includes/summary_item.html" with title='Tribal government' value=DomainRequest.tribe_name heading_level=heading_level %} - - {% if DomainRequest.federally_recognized_tribe %} -

Federally-recognized tribe

- {% endif %} - - {% if DomainRequest.state_recognized_tribe %} -

State-recognized tribe

- {% endif %} - - {% endif %} - - {% if DomainRequest.get_federal_type_display %} - {% include "includes/summary_item.html" with title='Federal government branch' value=DomainRequest.get_federal_type_display heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.is_election_board %} - {% with value=DomainRequest.is_election_board|yesno:"Yes,No,Incomplete" %} - {% include "includes/summary_item.html" with title='Election office' value=value heading_level=heading_level %} - {% endwith %} - {% endif %} - - {% if DomainRequest.organization_name %} - {% include "includes/summary_item.html" with title='Organization' value=DomainRequest address='true' heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.about_your_organization %} - {% include "includes/summary_item.html" with title='About your organization' value=DomainRequest.about_your_organization heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.senior_official %} - {% include "includes/summary_item.html" with title='Senior official' value=DomainRequest.senior_official contact='true' heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.current_websites.all %} - {% include "includes/summary_item.html" with title='Current websites' value=DomainRequest.current_websites.all list='true' heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.requested_domain %} - {% include "includes/summary_item.html" with title='.gov domain' value=DomainRequest.requested_domain heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.alternative_domains.all %} - {% include "includes/summary_item.html" with title='Alternative domains' value=DomainRequest.alternative_domains.all list='true' heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.purpose %} - {% include "includes/summary_item.html" with title='Purpose of your domain' value=DomainRequest.purpose heading_level=heading_level %} - {% endif %} - - {% if DomainRequest.creator %} - {% include "includes/summary_item.html" with title='Your contact information' value=DomainRequest.creator contact='true' heading_level=heading_level %} - {% endif %} - {% if DomainRequest.other_contacts.all %} - {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.other_contacts.all contact='true' list='true' heading_level=heading_level %} - {% else %} - {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.no_other_contacts_rationale heading_level=heading_level %} - {% endif %} - - {# We always show this field even if None #} - {% if DomainRequest %} -

CISA Regional Representative

-
    - {% if DomainRequest.cisa_representative_first_name %} - {{ DomainRequest.get_formatted_cisa_rep_name }} - {% else %} - No - {% endif %} -
- -

Anything else

-
    - {% if DomainRequest.anything_else %} - {{DomainRequest.anything_else}} - {% else %} - No - {% endif %} -
- {% endif %} - {% endwith %} -
- -
+ {% include "includes/request_status_manage.html" %} {% endblock %} diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index 63924bc1d..65c52ec9e 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -5,7 +5,7 @@ {% block title %} Home | {% endblock %} {% block content %} -
+
{% if user.is_authenticated %} {# the entire logged in page goes here #} diff --git a/src/registrar/templates/includes/domain_request.html b/src/registrar/templates/includes/domain_request_awaiting_review.html similarity index 57% rename from src/registrar/templates/includes/domain_request.html rename to src/registrar/templates/includes/domain_request_awaiting_review.html index 0e377f35c..cc9b31ccb 100644 --- a/src/registrar/templates/includes/domain_request.html +++ b/src/registrar/templates/includes/domain_request_awaiting_review.html @@ -5,8 +5,10 @@

We received your .gov domain request. Our next step is to review your request. This usually takes 30 business days. We’ll email you if we have questions and when we complete our review. Contact us with any questions.

-

- Need to make changes? -

+{% if show_withdraw_text %} +

+ Need to make changes? +

-

If you need to change your request you have to first withdraw it. Once you withdraw the request you can edit it and submit it again. Changing your request might add to the wait time.

+

If you need to change your request you have to first withdraw it. Once you withdraw the request you can edit it and submit it again. Changing your request might add to the wait time.

+{% endif %} diff --git a/src/registrar/templates/includes/domain_request_status_manage.html b/src/registrar/templates/includes/domain_request_status_manage.html new file mode 100644 index 000000000..2a254df4b --- /dev/null +++ b/src/registrar/templates/includes/domain_request_status_manage.html @@ -0,0 +1,236 @@ +{% load custom_filters %} +{% load static url_helpers %} +
+
+ {% block breadcrumb %} + {% if portfolio %} + {% url 'domain-requests' as url %} + {% else %} + {% url 'home' as url %} + {% endif %} + + {% endblock breadcrumb %} + + {% block header %} + {% if not DomainRequest.requested_domain and DomainRequest.status == DomainRequest.DomainRequestStatus.STARTED %} +

New domain request

+ {% else %} +

Domain request for {{ DomainRequest.requested_domain.name }}

+ {% endif %} + {% endblock header %} + + {% block status_summary %} +
+
+

+ + Status: + + {{ DomainRequest.get_status_display|default:"ERROR Please contact technical support/dev" }} +

+
+
+
+ {% endblock status_summary %} + + {% block status_metadata %} + + {% if portfolio %} + {% if DomainRequest.creator %} +

+ Created by: {{DomainRequest.creator.email|default:DomainRequest.creator.get_formatted_name }} +

+ {% else %} +

+ No creator found: this is an error, please email help@get.gov. +

+ {% endif %} + {% endif %} + + {% with statuses=DomainRequest.DomainRequestStatus last_submitted=DomainRequest.last_submitted_date|date:"F j, Y" first_submitted=DomainRequest.first_submitted_date|date:"F j, Y" last_status_update=DomainRequest.last_status_update|date:"F j, Y" %} + {% comment %} + These are intentionally seperated this way. + There is some code repetition, but it gives us more flexibility rather than a dense reduction. + Leave it this way until we've solidified our requirements. + {% endcomment %} + {% if DomainRequest.status == statuses.STARTED %} + {% with first_started_date=DomainRequest.get_first_status_started_date|date:"F j, Y" %} +

+ {% comment %} + A newly created domain request will not have a value for last_status update. + This is because the status never really updated. + However, if this somehow goes back to started we can default to displaying that new date. + {% endcomment %} + Started on: {{last_status_update|default:first_started_date}} +

+ {% endwith %} + {% elif DomainRequest.status == statuses.SUBMITTED %} +

+ Submitted on: {{last_submitted|default:first_submitted }} +

+

+ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +

+ {% elif DomainRequest.status == statuses.ACTION_NEEDED %} +

+ Submitted on: {{last_submitted|default:first_submitted }} +

+

+ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +

+ {% elif DomainRequest.status == statuses.REJECTED %} +

+ Submitted on: {{last_submitted|default:first_submitted }} +

+

+ Rejected on: {{last_status_update}} +

+ {% elif DomainRequest.status == statuses.WITHDRAWN %} +

+ Submitted on: {{last_submitted|default:first_submitted }} +

+

+ Withdrawn on: {{last_status_update}} +

+ {% else %} + {% comment %} Shown for in_review, approved, ineligible {% endcomment %} +

+ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +

+ {% endif %} + {% endwith %} + {% endblock status_metadata %} + + {% block status_blurb %} + {% if DomainRequest.is_awaiting_review %} +

{% include "includes/domain_request_awaiting_review.html" with show_withdraw_text=DomainRequest.is_withdrawable %}

+ {% endif %} + {% endblock status_blurb %} + + {% block modify_request %} + {% if DomainRequest.is_withdrawable %} +

+ Withdraw request +

+ {% endif %} + {% endblock modify_request %} +
+ +
+ {% block request_summary_header %} +

Summary of your domain request

+ {% endblock request_summary_header%} + + {% block request_summary %} + {% with heading_level='h3' %} + {% with org_type=DomainRequest.get_generic_org_type_display %} + {% include "includes/summary_item.html" with title='Type of organization' value=org_type heading_level=heading_level %} + {% endwith %} + + {% if DomainRequest.tribe_name %} + {% include "includes/summary_item.html" with title='Tribal government' value=DomainRequest.tribe_name heading_level=heading_level %} + + {% if DomainRequest.federally_recognized_tribe %} +

Federally-recognized tribe

+ {% endif %} + + {% if DomainRequest.state_recognized_tribe %} +

State-recognized tribe

+ {% endif %} + + {% endif %} + + {% if DomainRequest.get_federal_type_display %} + {% include "includes/summary_item.html" with title='Federal government branch' value=DomainRequest.get_federal_type_display heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.is_election_board %} + {% with value=DomainRequest.is_election_board|yesno:"Yes,No,Incomplete" %} + {% include "includes/summary_item.html" with title='Election office' value=value heading_level=heading_level %} + {% endwith %} + {% endif %} + + {% if DomainRequest.organization_name %} + {% include "includes/summary_item.html" with title='Organization' value=DomainRequest address='true' heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.about_your_organization %} + {% include "includes/summary_item.html" with title='About your organization' value=DomainRequest.about_your_organization heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.senior_official %} + {% include "includes/summary_item.html" with title='Senior official' value=DomainRequest.senior_official contact='true' heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.current_websites.all %} + {% include "includes/summary_item.html" with title='Current websites' value=DomainRequest.current_websites.all list='true' heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.requested_domain %} + {% include "includes/summary_item.html" with title='.gov domain' value=DomainRequest.requested_domain heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.alternative_domains.all %} + {% include "includes/summary_item.html" with title='Alternative domains' value=DomainRequest.alternative_domains.all list='true' heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.purpose %} + {% include "includes/summary_item.html" with title='Purpose of your domain' value=DomainRequest.purpose heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.creator %} + {% include "includes/summary_item.html" with title='Your contact information' value=DomainRequest.creator contact='true' heading_level=heading_level %} + {% endif %} + + {% if DomainRequest.other_contacts.all %} + {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.other_contacts.all contact='true' list='true' heading_level=heading_level %} + {% else %} + {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.no_other_contacts_rationale heading_level=heading_level %} + {% endif %} + + {# We always show this field even if None #} + {% if DomainRequest %} +

CISA Regional Representative

+
    + {% if DomainRequest.cisa_representative_first_name %} + {{ DomainRequest.get_formatted_cisa_rep_name }} + {% else %} + No + {% endif %} +
+

Anything else

+
    + {% if DomainRequest.anything_else %} + {{DomainRequest.anything_else}} + {% else %} + No + {% endif %} +
+ {% endif %} + {% endwith %} + {% endblock request_summary%} +
+
\ No newline at end of file diff --git a/src/registrar/templates/includes/domains_table.html b/src/registrar/templates/includes/domains_table.html index 76ead3a2c..11d3ac945 100644 --- a/src/registrar/templates/includes/domains_table.html +++ b/src/registrar/templates/includes/domains_table.html @@ -13,7 +13,7 @@ {% endif %} -