mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
Merge pull request #3150 from cisagov/za/lint-2737
[BUGFIX] Fix failing linter + fix javascript bug (failing js on pages) - [MEOWARD]
This commit is contained in:
commit
3a4ba383eb
7 changed files with 18 additions and 27 deletions
|
@ -2925,7 +2925,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
const selectParent = select?.parentElement;
|
const selectParent = select?.parentElement;
|
||||||
const suborgContainer = document.getElementById("suborganization-container");
|
const suborgContainer = document.getElementById("suborganization-container");
|
||||||
const suborgDetailsContainer = document.getElementById("suborganization-container__details");
|
const suborgDetailsContainer = document.getElementById("suborganization-container__details");
|
||||||
const subOrgCreateNewOption = document.getElementById("option-to-add-suborg").value
|
const subOrgCreateNewOption = document.getElementById("option-to-add-suborg")?.value;
|
||||||
// Make sure all crucial page elements exist before proceeding.
|
// Make sure all crucial page elements exist before proceeding.
|
||||||
// This more or less ensures that we are on the Requesting Entity page, and not elsewhere.
|
// This more or less ensures that we are on the Requesting Entity page, and not elsewhere.
|
||||||
if (!radios || !select || !selectParent || !suborgContainer || !suborgDetailsContainer) return;
|
if (!radios || !select || !selectParent || !suborgContainer || !suborgDetailsContainer) return;
|
||||||
|
|
|
@ -2,7 +2,12 @@ from django.db import models
|
||||||
from django.forms import ValidationError
|
from django.forms import ValidationError
|
||||||
from registrar.models.user_domain_role import UserDomainRole
|
from registrar.models.user_domain_role import UserDomainRole
|
||||||
from registrar.utility.waffle import flag_is_active_for_user
|
from registrar.utility.waffle import flag_is_active_for_user
|
||||||
from registrar.models.utility.portfolio_helper import UserPortfolioPermissionChoices, UserPortfolioRoleChoices, DomainRequestPermissionDisplay, MemberPermissionDisplay
|
from registrar.models.utility.portfolio_helper import (
|
||||||
|
UserPortfolioPermissionChoices,
|
||||||
|
UserPortfolioRoleChoices,
|
||||||
|
DomainRequestPermissionDisplay,
|
||||||
|
MemberPermissionDisplay,
|
||||||
|
)
|
||||||
from .utility.time_stamped_model import TimeStampedModel
|
from .utility.time_stamped_model import TimeStampedModel
|
||||||
from django.contrib.postgres.fields import ArrayField
|
from django.contrib.postgres.fields import ArrayField
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ class DomainRequestPermissionDisplay(StrEnum):
|
||||||
- VIEWER: "Viewer"
|
- VIEWER: "Viewer"
|
||||||
- NONE: "None"
|
- NONE: "None"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VIEWER_REQUESTER = "Viewer Requester"
|
VIEWER_REQUESTER = "Viewer Requester"
|
||||||
VIEWER = "Viewer"
|
VIEWER = "Viewer"
|
||||||
NONE = "None"
|
NONE = "None"
|
||||||
|
@ -64,6 +65,7 @@ class MemberPermissionDisplay(StrEnum):
|
||||||
- VIEWER: "Viewer"
|
- VIEWER: "Viewer"
|
||||||
- NONE: "None"
|
- NONE: "None"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MANAGER = "Manager"
|
MANAGER = "Manager"
|
||||||
VIEWER = "Viewer"
|
VIEWER = "Viewer"
|
||||||
NONE = "None"
|
NONE = "None"
|
||||||
|
|
|
@ -7,7 +7,11 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
<input id="option-to-add-suborg" value="Other (enter your suborganization manually)"/>
|
{% comment %}
|
||||||
|
Store the other option in a variable to be used by the js function handleRequestingEntity.
|
||||||
|
Injected into the 'sub_organization' option list.
|
||||||
|
{% endcomment %}
|
||||||
|
<input id="option-to-add-suborg" class="display-none" value="Other (enter your suborganization manually)"/>
|
||||||
<fieldset class="usa-fieldset">
|
<fieldset class="usa-fieldset">
|
||||||
<legend>
|
<legend>
|
||||||
<h2>Who will use the domain you’re requesting?</h2>
|
<h2>Who will use the domain you’re requesting?</h2>
|
||||||
|
|
|
@ -263,25 +263,6 @@ class BaseExport(ABC):
|
||||||
def get_model_annotation_dict(cls, **kwargs):
|
def get_model_annotation_dict(cls, **kwargs):
|
||||||
return convert_queryset_to_dict(cls.get_annotated_queryset(**kwargs), is_model=False)
|
return convert_queryset_to_dict(cls.get_annotated_queryset(**kwargs), is_model=False)
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def export_data_to_csv(cls, csv_file, **kwargs):
|
|
||||||
"""
|
|
||||||
All domain metadata:
|
|
||||||
Exports domains of all statuses plus domain managers.
|
|
||||||
"""
|
|
||||||
writer = csv.writer(csv_file)
|
|
||||||
columns = cls.get_columns()
|
|
||||||
models_dict = cls.get_model_annotation_dict(**kwargs)
|
|
||||||
|
|
||||||
# Write to csv file before the write_csv
|
|
||||||
cls.write_csv_before(writer, **kwargs)
|
|
||||||
|
|
||||||
# Write the csv file
|
|
||||||
rows = cls.write_csv(writer, columns, models_dict)
|
|
||||||
|
|
||||||
# Return rows that for easier parsing and testing
|
|
||||||
return rows
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def write_csv(
|
def write_csv(
|
||||||
cls,
|
cls,
|
||||||
|
|
|
@ -49,6 +49,7 @@ class DefaultUserValues(StrEnum):
|
||||||
- SYSTEM: "System" <= Default username
|
- SYSTEM: "System" <= Default username
|
||||||
- UNRETRIEVED: "Unretrieved" <= Default email state
|
- UNRETRIEVED: "Unretrieved" <= Default email state
|
||||||
"""
|
"""
|
||||||
|
|
||||||
HELP_EMAIL = "help@get.gov"
|
HELP_EMAIL = "help@get.gov"
|
||||||
SYSTEM = "System"
|
SYSTEM = "System"
|
||||||
UNRETRIEVED = "Unretrieved"
|
UNRETRIEVED = "Unretrieved"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.core.paginator import Paginator
|
from django.core.paginator import Paginator
|
||||||
from django.db.models import Value, F, CharField, TextField, Q, Case, When, OuterRef, Subquery
|
from django.db.models import Value, F, CharField, TextField, Q, Case, When, OuterRef, Subquery
|
||||||
from django.db.models.expressions import Func
|
|
||||||
from django.db.models.functions import Cast, Coalesce, Concat
|
from django.db.models.functions import Cast, Coalesce, Concat
|
||||||
from django.contrib.postgres.aggregates import ArrayAgg
|
from django.contrib.postgres.aggregates import ArrayAgg
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -214,4 +213,3 @@ class PortfolioMembersJson(PortfolioMembersPermission, View):
|
||||||
"svg_icon": ("visibility" if view_only else "settings"),
|
"svg_icon": ("visibility" if view_only else "settings"),
|
||||||
}
|
}
|
||||||
return member_json
|
return member_json
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue