Skip to content

Commit

Permalink
Merge pull request #1256 from cisagov/za/1194-remove-new-requests
Browse files Browse the repository at this point in the history
Ticket #1194: Disable New Requests
  • Loading branch information
zandercymatics authored Nov 8, 2023
2 parents 7cdaad9 + 8cf1296 commit f1de6d8
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ops/manifests/manifest-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ applications:
GETGOV_PUBLIC_SITE_URL: https://beta.get.gov
# Which OIDC provider to use
OIDC_ACTIVE_PROVIDER: login.gov production
# Flag to disable/enable features in prod environments
IS_PRODUCTION: True
routes:
- route: getgov-stable.app.cloud.gov
services:
Expand Down
18 changes: 18 additions & 0 deletions src/registrar/assets/sass/_theme/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ a.usa-button {
text-decoration: none;
}

a.usa-button.disabled-link {
background-color: #ccc !important;
color: #454545 !important
}

a.usa-button.disabled-link:hover {
background-color: #ccc !important;
cursor: not-allowed !important;
color: #454545 !important
}

a.usa-button.disabled-link:focus {
background-color: #ccc !important;
cursor: not-allowed !important;
outline: none !important;
color: #454545 !important
}

a.usa-button:not(.usa-button--unstyled, .usa-button--outline) {
color: color('white');
}
Expand Down
6 changes: 6 additions & 0 deletions src/registrar/assets/sass/_theme/_uswds-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,10 @@ in the form $setting: value,
$theme-table-sorted-background-color: "accent-cool-lightest",
$theme-table-sorted-icon-color: "primary-darker",
$theme-table-unsorted-icon-color: "primary",

/*----------------------------
# Tooltip Settings
-----------------------------*/
$theme-tooltip-background-color: "accent-cool-lightest",
$theme-tooltip-font-color: "black"
);
3 changes: 3 additions & 0 deletions src/registrar/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

env_db_url = env.dj_db_url("DATABASE_URL")
env_debug = env.bool("DJANGO_DEBUG", default=False)
env_is_production = env.bool("IS_PRODUCTION", default=False)
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
env_base_url = env.str("DJANGO_BASE_URL")
env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "")
Expand Down Expand Up @@ -73,6 +74,8 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env_debug

# Controls production specific feature toggles
IS_PRODUCTION = env_is_production

# Applications are modular pieces of code.
# They are provided by Django, by third-parties, or by yourself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Command(BaseCommand):
# Running this script removes all existing transition domains, so use with caution.
# Transition domains are created with email addresses provided as command line
# argument. Email addresses for testing are passed as comma delimited list of
# email addresses, and are required to be provided. Email addresses from the list
# email addresses, and are required to be provided. Email addresses from the list
# are assigned to transition domains at time of creation.

def add_arguments(self, parser):
Expand Down
17 changes: 15 additions & 2 deletions src/registrar/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,22 @@
<h1>Manage your domains</h2>

<p class="margin-top-4">
<a href="{% url 'application:' %}" class="usa-button">
{% if is_production %}
<a href="javascript:void(0)"
class="usa-button usa-tooltip disabled-link"
data-position="right"
title="Coming in 2024"
aria-disabled="true"
data-tooltip="true"
>
Start a new domain request
</a>
{% else %}
<a href="{% url 'application:' %}" class="usa-button"
>
Start a new domain request
</a>
{% endif %}
</p>

<section class="section--outlined tablet:grid-col-11 desktop:grid-col-10">
Expand Down Expand Up @@ -130,7 +143,7 @@ <h2>Domain requests</h2>
{% endif %}
</section>

{# Note: Reimplement this after MVP.. #}
{# Note: Reimplement this after MVP #}
<!--
<section class="section--outlined tablet:grid-col-11 desktop:grid-col-10">
<h2>Archived domains</h2>
Expand Down
2 changes: 2 additions & 0 deletions src/registrar/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.shortcuts import render

from registrar.models import DomainApplication
from django.conf import settings


def index(request):
Expand All @@ -22,4 +23,5 @@ def index(request):
state=F("domain__state"),
)
context["domains"] = domains
context["is_production"] = settings.IS_PRODUCTION
return render(request, "home.html", context)

0 comments on commit f1de6d8

Please sign in to comment.