add detail style and hide fed agency

This commit is contained in:
zandercymatics 2024-09-25 15:29:40 -06:00
parent 7b2b4f0401
commit 2430d3ecf6
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 9 additions and 8 deletions

View file

@ -883,22 +883,22 @@ function initializeWidgetOnList(list, parentId) {
// Handle hiding the organization name field when the organization_type is federal.
// Run this first one page load, then secondly on a change event.
let organizationNameContainer = document.querySelector(".field-organization_name");
if (!organizationNameContainer) {
organizationNameContainer = document.querySelector("#id_organization_name");
}
handleOrganizationTypeChange(organizationType, organizationNameContainer);
let federalType = document.querySelector(".field-federal_type");
handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType);
organizationType.addEventListener("change", function() {
handleOrganizationTypeChange(organizationType, organizationNameContainer);
handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType);
});
});
function handleOrganizationTypeChange(organizationType, organizationNameContainer) {
if (organizationType && organizationNameContainer) {
function handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType) {
if (organizationType && organizationNameContainer && federalType) {
let selectedValue = organizationType.value;
if (selectedValue === "federal") {
hideElement(organizationNameContainer);
showElement(federalType);
} else {
showElement(organizationNameContainer);
hideElement(federalType);
}
}
}

View file

@ -453,7 +453,8 @@ details.dja-detail-table {
background-color: var(--body-bg);
.dja-details-summary {
cursor: pointer;
color: var(--body-quiet-color);
color: var(--link-fg);
text-decoration: underline;
}
@media (max-width: 1024px){