mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
Cleanup. Admin updates
This commit is contained in:
parent
44c74c7c86
commit
9d872d065c
6 changed files with 32 additions and 26 deletions
|
@ -1132,7 +1132,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
|||
},
|
||||
),
|
||||
(".gov domain", {"fields": ["requested_domain", "alternative_domains"]}),
|
||||
("Contacts", {"fields": ["authorizing_official", "other_contacts", "no_other_contacts_rationale"]}),
|
||||
("Contacts", {"fields": ["authorizing_official", "other_contacts", "no_other_contacts_rationale", "cisa_representative_email"]}),
|
||||
("Background info", {"fields": ["purpose", "anything_else", "current_websites"]}),
|
||||
(
|
||||
"Type of organization",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.10 on 2024-04-11 00:43
|
||||
# Generated by Django 4.2.10 on 2024-04-11 21:40
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
@ -13,11 +13,29 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="domaininformation",
|
||||
name="cisa_representative_email",
|
||||
field=models.EmailField(blank=True, db_index=True, max_length=254, null=True),
|
||||
field=models.EmailField(
|
||||
blank=True, db_index=True, max_length=254, null=True, verbose_name="CISA region representative"
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="domainrequest",
|
||||
name="cisa_representative_email",
|
||||
field=models.EmailField(blank=True, db_index=True, max_length=254, null=True),
|
||||
field=models.EmailField(
|
||||
blank=True, db_index=True, max_length=254, null=True, verbose_name="CISA region representative"
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="domaininformation",
|
||||
name="anything_else",
|
||||
field=models.TextField(
|
||||
blank=True, help_text="Anything else?", null=True, verbose_name="Additional Details"
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="domainrequest",
|
||||
name="anything_else",
|
||||
field=models.TextField(
|
||||
blank=True, help_text="Anything else?", null=True, verbose_name="Additional Details"
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -213,12 +213,14 @@ class DomainInformation(TimeStampedModel):
|
|||
null=True,
|
||||
blank=True,
|
||||
help_text="Anything else?",
|
||||
verbose_name="Additional Details",
|
||||
)
|
||||
|
||||
cisa_representative_email = models.EmailField(
|
||||
null=True,
|
||||
blank=True,
|
||||
db_index=True,
|
||||
verbose_name="CISA region representative",
|
||||
)
|
||||
|
||||
is_policy_acknowledged = models.BooleanField(
|
||||
|
|
|
@ -644,12 +644,14 @@ class DomainRequest(TimeStampedModel):
|
|||
null=True,
|
||||
blank=True,
|
||||
help_text="Anything else?",
|
||||
verbose_name="Additional Details",
|
||||
)
|
||||
|
||||
cisa_representative_email = models.EmailField(
|
||||
null=True,
|
||||
blank=True,
|
||||
db_index=True,
|
||||
verbose_name="CISA region representative",
|
||||
)
|
||||
|
||||
is_policy_acknowledged = models.BooleanField(
|
||||
|
@ -1046,6 +1048,9 @@ class DomainRequest(TimeStampedModel):
|
|||
"""Does this domain request have cisa representative?"""
|
||||
return self.cisa_representative_email != "" and self.cisa_representative_email is not None
|
||||
|
||||
def has_additional_details(self) -> bool:
|
||||
return self.has_anything_else_text() or self.has_cisa_representative()
|
||||
|
||||
def is_federal(self) -> Union[bool, None]:
|
||||
"""Is this domain request for a federal agency?
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
{% extends 'domain_request_form.html' %}
|
||||
{% load field_helpers %}
|
||||
|
||||
{% block form_instructions %}
|
||||
<h2>Is there anything else you’d like us to know about your domain request?</h2>
|
||||
|
||||
<p>This question is optional.</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_required_fields_help_text %}
|
||||
{# commented out so it does not appear on this page #}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block form_fields %}
|
||||
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||
{% input_with_errors forms.0.anything_else %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
|
@ -1,9 +1,9 @@
|
|||
{% load static url_helpers %}
|
||||
|
||||
{# TODO (future ticket?): create a template that allows us to easily display nested forms.
|
||||
<!-- TODO (future ticket?): create a template that allows us to easily display nested forms.
|
||||
It is a little complex because we will have to formulate how to aggregate form pairings.
|
||||
(eg. yes/no radio forms plus the information they toggle need to be linked somehow
|
||||
and condense down into one subsection)}
|
||||
and condense down into one subsection) -->
|
||||
|
||||
<section class="summary-item margin-top-3">
|
||||
<hr class="" aria-hidden="true" />
|
||||
|
@ -19,7 +19,7 @@ and condense down into one subsection)}
|
|||
Additional Details
|
||||
</h2>
|
||||
|
||||
{% if domainRequest %}
|
||||
{% if domainRequest is not none %}
|
||||
<dl class="usa-list usa-list--unstyled margin-top-0">
|
||||
<dt>
|
||||
CISA regions representative
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue