mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
Merge branch 'za/1852-user-contact-info-inline' into za/1848-copy-contact-email-to-clipboard
This commit is contained in:
commit
bcb1f80f57
12 changed files with 287 additions and 231 deletions
|
@ -925,6 +925,9 @@ class DomainInformationAdmin(ListHeaderAdmin):
|
|||
),
|
||||
]
|
||||
|
||||
# Readonly fields for analysts and superusers
|
||||
readonly_fields = ("other_contacts",)
|
||||
|
||||
# Read only that we'll leverage for CISA Analysts
|
||||
analyst_readonly_fields = [
|
||||
"creator",
|
||||
|
@ -936,7 +939,6 @@ class DomainInformationAdmin(ListHeaderAdmin):
|
|||
"no_other_contacts_rationale",
|
||||
"anything_else",
|
||||
"is_policy_acknowledged",
|
||||
"other_contacts",
|
||||
]
|
||||
|
||||
# For each filter_horizontal, init in admin js extendFilterHorizontalWidgets
|
||||
|
@ -1135,6 +1137,9 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
|||
),
|
||||
]
|
||||
|
||||
# Readonly fields for analysts and superusers
|
||||
readonly_fields = ("other_contacts", "current_websites", "alternative_domains")
|
||||
|
||||
# Read only that we'll leverage for CISA Analysts
|
||||
analyst_readonly_fields = [
|
||||
"creator",
|
||||
|
@ -1142,8 +1147,6 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
|||
"requested_domain",
|
||||
"approved_domain",
|
||||
"alternative_domains",
|
||||
"other_contacts",
|
||||
"current_websites",
|
||||
"purpose",
|
||||
"submitter",
|
||||
"no_other_contacts_rationale",
|
||||
|
@ -1319,7 +1322,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
|||
readonly_fields.extend([field.name for field in self.model._meta.fields])
|
||||
# Add the multi-select fields to readonly_fields:
|
||||
# Complex fields like ManyToManyField require special handling
|
||||
readonly_fields.extend(["current_websites", "other_contacts", "alternative_domains"])
|
||||
readonly_fields.extend(["alternative_domains"])
|
||||
|
||||
if request.user.has_perm("registrar.full_access_permission"):
|
||||
return readonly_fields
|
||||
|
@ -1432,7 +1435,6 @@ class DomainAdmin(ListHeaderAdmin):
|
|||
)
|
||||
|
||||
def queryset(self, request, queryset):
|
||||
logger.debug(self.value())
|
||||
if self.value() == "1":
|
||||
return queryset.filter(domain_info__is_election_board=True)
|
||||
if self.value() == "0":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue