mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
fixing a bug in suborganization handling
This commit is contained in:
parent
654df17131
commit
af10118803
1 changed files with 7 additions and 7 deletions
|
@ -544,19 +544,19 @@ function handlePortfolioSelection() {
|
||||||
* This function ensures the form dynamically reflects whether a specific suborganization is being selected or requested.
|
* This function ensures the form dynamically reflects whether a specific suborganization is being selected or requested.
|
||||||
*/
|
*/
|
||||||
function updateSuborganizationFieldsDisplay() {
|
function updateSuborganizationFieldsDisplay() {
|
||||||
|
let portfolio_id = portfolioDropdown.val();
|
||||||
let suborganization_id = suborganizationDropdown.val();
|
let suborganization_id = suborganizationDropdown.val();
|
||||||
|
|
||||||
if (suborganization_id) {
|
if (portfolio_id && !suborganization_id) {
|
||||||
// Hide suborganization request fields if suborganization is selected
|
|
||||||
hideElement(requestedSuborganizationField);
|
|
||||||
hideElement(suborganizationCity);
|
|
||||||
hideElement(suborganizationStateTerritory);
|
|
||||||
} else {
|
|
||||||
// Show suborganization request fields
|
// Show suborganization request fields
|
||||||
showElement(requestedSuborganizationField);
|
showElement(requestedSuborganizationField);
|
||||||
showElement(suborganizationCity);
|
showElement(suborganizationCity);
|
||||||
showElement(suborganizationStateTerritory);
|
showElement(suborganizationStateTerritory);
|
||||||
|
} else {
|
||||||
|
// Hide suborganization request fields if suborganization is selected
|
||||||
|
hideElement(requestedSuborganizationField);
|
||||||
|
hideElement(suborganizationCity);
|
||||||
|
hideElement(suborganizationStateTerritory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue