Merge pull request #1256 from cisagov/za/1194-remove-new-requests

Ticket #1194: Disable New Requests
This commit is contained in:
zandercymatics 2023-11-08 09:13:50 -07:00 committed by GitHub
commit f1de6d882c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 3 deletions

View file

@ -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:

View file

@ -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');
}

View file

@ -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"
);

View file

@ -46,6 +46,7 @@ path = Path(__file__)
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", "")
@ -73,6 +74,8 @@ BASE_DIR = path.resolve().parent.parent.parent
# 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.

View file

@ -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):

View file

@ -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">
@ -130,7 +143,7 @@
{% 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>

View file

@ -2,6 +2,7 @@ from django.db.models import F
from django.shortcuts import render
from registrar.models import DomainApplication
from django.conf import settings
def index(request):
@ -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)