mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-19 17:25:56 +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.
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue