mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 02:06:03 +02:00
add detail style and hide fed agency
This commit is contained in:
parent
7b2b4f0401
commit
2430d3ecf6
2 changed files with 9 additions and 8 deletions
|
@ -883,22 +883,22 @@ function initializeWidgetOnList(list, parentId) {
|
||||||
// Handle hiding the organization name field when the organization_type is federal.
|
// Handle hiding the organization name field when the organization_type is federal.
|
||||||
// Run this first one page load, then secondly on a change event.
|
// Run this first one page load, then secondly on a change event.
|
||||||
let organizationNameContainer = document.querySelector(".field-organization_name");
|
let organizationNameContainer = document.querySelector(".field-organization_name");
|
||||||
if (!organizationNameContainer) {
|
let federalType = document.querySelector(".field-federal_type");
|
||||||
organizationNameContainer = document.querySelector("#id_organization_name");
|
handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType);
|
||||||
}
|
|
||||||
handleOrganizationTypeChange(organizationType, organizationNameContainer);
|
|
||||||
organizationType.addEventListener("change", function() {
|
organizationType.addEventListener("change", function() {
|
||||||
handleOrganizationTypeChange(organizationType, organizationNameContainer);
|
handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleOrganizationTypeChange(organizationType, organizationNameContainer) {
|
function handleOrganizationTypeChange(organizationType, organizationNameContainer, federalType) {
|
||||||
if (organizationType && organizationNameContainer) {
|
if (organizationType && organizationNameContainer && federalType) {
|
||||||
let selectedValue = organizationType.value;
|
let selectedValue = organizationType.value;
|
||||||
if (selectedValue === "federal") {
|
if (selectedValue === "federal") {
|
||||||
hideElement(organizationNameContainer);
|
hideElement(organizationNameContainer);
|
||||||
|
showElement(federalType);
|
||||||
} else {
|
} else {
|
||||||
showElement(organizationNameContainer);
|
showElement(organizationNameContainer);
|
||||||
|
hideElement(federalType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -453,7 +453,8 @@ details.dja-detail-table {
|
||||||
background-color: var(--body-bg);
|
background-color: var(--body-bg);
|
||||||
.dja-details-summary {
|
.dja-details-summary {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--body-quiet-color);
|
color: var(--link-fg);
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px){
|
@media (max-width: 1024px){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue