mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-30 13:03:14 +02:00
fixed merge conflicts
This commit is contained in:
commit
566d067f57
7 changed files with 25 additions and 13 deletions
|
@ -2786,9 +2786,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
const radioFieldset = document.getElementById(`id_${formPrefix}-requesting_entity_is_suborganization__fieldset`);
|
const radioFieldset = document.getElementById(`id_${formPrefix}-requesting_entity_is_suborganization__fieldset`);
|
||||||
const radios = radioFieldset?.querySelectorAll(`input[name="${formPrefix}-requesting_entity_is_suborganization"]`);
|
const radios = radioFieldset?.querySelectorAll(`input[name="${formPrefix}-requesting_entity_is_suborganization"]`);
|
||||||
const select = document.getElementById(`id_${formPrefix}-sub_organization`);
|
const select = document.getElementById(`id_${formPrefix}-sub_organization`);
|
||||||
|
const selectParent = select?.parentElement;
|
||||||
const suborgContainer = document.getElementById("suborganization-container");
|
const suborgContainer = document.getElementById("suborganization-container");
|
||||||
const suborgDetailsContainer = document.getElementById("suborganization-container__details");
|
const suborgDetailsContainer = document.getElementById("suborganization-container__details");
|
||||||
if (!radios || !select || !suborgContainer || !suborgDetailsContainer) return;
|
if (!radios || !select || !selectParent || !suborgContainer || !suborgDetailsContainer) return;
|
||||||
|
|
||||||
// requestingSuborganization: This just broadly determines if they're requesting a suborg at all
|
// requestingSuborganization: This just broadly determines if they're requesting a suborg at all
|
||||||
// requestingNewSuborganization: This variable determines if the user is trying to *create* a new suborganization or not.
|
// requestingNewSuborganization: This variable determines if the user is trying to *create* a new suborganization or not.
|
||||||
|
@ -2799,6 +2800,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
if (radio != null) requestingSuborganization = radio?.checked && radio.value === "True";
|
if (radio != null) requestingSuborganization = radio?.checked && radio.value === "True";
|
||||||
requestingSuborganization ? showElement(suborgContainer) : hideElement(suborgContainer);
|
requestingSuborganization ? showElement(suborgContainer) : hideElement(suborgContainer);
|
||||||
requestingNewSuborganization.value = requestingSuborganization && select.value === "other" ? "True" : "False";
|
requestingNewSuborganization.value = requestingSuborganization && select.value === "other" ? "True" : "False";
|
||||||
|
|
||||||
|
if (requestingNewSuborganization.value === "True") {
|
||||||
|
selectParent.classList.add("padding-bottom-2");
|
||||||
|
showElement(suborgDetailsContainer);
|
||||||
|
}else {
|
||||||
|
selectParent.classList.remove("padding-bottom-2");
|
||||||
|
hideElement(suborgDetailsContainer);
|
||||||
|
}
|
||||||
requestingNewSuborganization.value === "True" ? showElement(suborgDetailsContainer) : hideElement(suborgDetailsContainer);
|
requestingNewSuborganization.value === "True" ? showElement(suborgDetailsContainer) : hideElement(suborgDetailsContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,6 @@ body {
|
||||||
padding-top: units(5)!important;
|
padding-top: units(5)!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wrapper.dashboard--portfolio {
|
|
||||||
padding-top: units(4)!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wrapper.dashboard--grey-1 {
|
#wrapper.dashboard--grey-1 {
|
||||||
background-color: color('gray-1');
|
background-color: color('gray-1');
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,10 @@ class RequestingEntityForm(RegistrarForm):
|
||||||
if not cleaned_data.get("suborganization_city"):
|
if not cleaned_data.get("suborganization_city"):
|
||||||
self.add_error("suborganization_city", "Enter the city where your suborganization is located.")
|
self.add_error("suborganization_city", "Enter the city where your suborganization is located.")
|
||||||
if not cleaned_data.get("suborganization_state_territory"):
|
if not cleaned_data.get("suborganization_state_territory"):
|
||||||
self.add_error("suborganization_state_territory", "Select the state, territory, or military post where your suborganization is located.")
|
self.add_error(
|
||||||
|
"suborganization_state_territory",
|
||||||
|
"Select the state, territory, or military post where your suborganization is located.",
|
||||||
|
)
|
||||||
elif not suborganization:
|
elif not suborganization:
|
||||||
self.add_error("sub_organization", "Suborganization is required.")
|
self.add_error("sub_organization", "Suborganization is required.")
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
<div id="suborganization-container" class="margin-top-4">
|
<div id="suborganization-container" class="margin-top-4">
|
||||||
<h2>Add suborganization information</h2>
|
<h2>Add suborganization information</h2>
|
||||||
<p>
|
<p>
|
||||||
This information will be published in <a class="usa-link usa-link--always-blue" href="{% public_site_url 'about/data' %}">.gov’s public data</a>. If you don’t see your suborganization in the list,
|
This information will be published in <a class="usa-link usa-link--always-blue" target="_blank" href="{% public_site_url 'about/data' %}">.gov’s public data</a>. If you don’t see your suborganization in the list,
|
||||||
select “other”.
|
select “other.”
|
||||||
</p>
|
</p>
|
||||||
{% with attr_required=True %}
|
{% with attr_required=True %}
|
||||||
{% input_with_errors forms.1.sub_organization %}
|
{% input_with_errors forms.1.sub_organization %}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block wrapper %}
|
{% block wrapper %}
|
||||||
<div id="wrapper" class="{% block wrapper_class %}dashboard--portfolio{% endblock %}">
|
<div id="wrapper" class="{% block wrapper_class %}wrapper--padding-top-6{% endblock %}">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<main class="grid-container {% if is_widescreen_mode %} grid-container--widescreen {% endif %}">
|
<main class="grid-container {% if is_widescreen_mode %} grid-container--widescreen {% endif %}">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<h2 id="domains-header" class="display-inline-block">You aren’t managing any domains.</h2>
|
<h2 id="domains-header" class="display-inline-block">You aren’t managing any domains.</h2>
|
||||||
{% if portfolio_administrators %}
|
{% if portfolio_administrators %}
|
||||||
<p>If you believe you should have access to a domain, reach out to your organization’s administrators.</p>
|
<p>If you believe you should have access to a domain, reach out to your organization’s administrators.</p>
|
||||||
<p>Your organizations administrators:</p>
|
<p>Your organization's administrators:</p>
|
||||||
<ul class="margin-top-0">
|
<ul class="margin-top-0">
|
||||||
{% for administrator in portfolio_administrators %}
|
{% for administrator in portfolio_administrators %}
|
||||||
{% if administrator.email %}
|
{% if administrator.email %}
|
||||||
|
|
|
@ -1794,9 +1794,13 @@ class TestRequestingEntity(WebTest):
|
||||||
form["portfolio_requesting_entity-is_requesting_new_suborganization"] = True
|
form["portfolio_requesting_entity-is_requesting_new_suborganization"] = True
|
||||||
response = form.submit()
|
response = form.submit()
|
||||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
self.assertContains(response, "Requested suborganization is required.", status_code=200)
|
self.assertContains(response, "Enter the name of your suborganization.", status_code=200)
|
||||||
self.assertContains(response, "City is required.", status_code=200)
|
self.assertContains(response, "Enter the city where your suborganization is located.", status_code=200)
|
||||||
self.assertContains(response, "State, territory, or military post is required.", status_code=200)
|
self.assertContains(
|
||||||
|
response,
|
||||||
|
"Select the state, territory, or military post where your suborganization is located.",
|
||||||
|
status_code=200,
|
||||||
|
)
|
||||||
|
|
||||||
@override_flag("organization_feature", active=True)
|
@override_flag("organization_feature", active=True)
|
||||||
@override_flag("organization_requests", active=True)
|
@override_flag("organization_requests", active=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue