mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
cleanup from PR
This commit is contained in:
parent
06f9abae6b
commit
56475ec09d
2 changed files with 7 additions and 29 deletions
|
@ -115,17 +115,13 @@ export function initAddNewMemberPageListeners() {
|
|||
if (selectedRadio) {
|
||||
const label = fieldset.querySelector(`label[for="${selectedRadio.id}"]`);
|
||||
if (label) {
|
||||
// Get only the text node content (excluding subtext in <p>)
|
||||
const mainText = Array.from(label.childNodes)
|
||||
.filter(node => node.nodeType === Node.TEXT_NODE)
|
||||
.map(node => node.textContent.trim())
|
||||
.join(""); // Combine and trim whitespace
|
||||
selectedPermission = mainText || "No permission selected";
|
||||
// Get only the text node content (excluding subtext in <p>)
|
||||
const mainText = Array.from(label.childNodes)
|
||||
.filter(node => node.nodeType === Node.TEXT_NODE)
|
||||
.map(node => node.textContent.trim())
|
||||
.join(""); // Combine and trim whitespace
|
||||
selectedPermission = mainText || "No permission selected";
|
||||
}
|
||||
|
||||
|
||||
// const label = fieldset.querySelector(`label[for="${selectedRadio.id}"]`);
|
||||
// selectedPermission = label ? label.textContent : "No permission selected";
|
||||
}
|
||||
appendPermissionInContainer(sectionTitle, selectedPermission, permissionDetailsContainer);
|
||||
}
|
||||
|
@ -142,8 +138,7 @@ export function initAddNewMemberPageListeners() {
|
|||
// Create new elements for the content
|
||||
const titleElement = document.createElement("h4");
|
||||
titleElement.textContent = sectionTitle;
|
||||
titleElement.classList.add("text-primary");
|
||||
titleElement.classList.add("margin-bottom-0");
|
||||
titleElement.classList.add("text-primary", "margin-bottom-0");
|
||||
|
||||
const permissionElement = document.createElement("p");
|
||||
permissionElement.textContent = permissionDisplay;
|
||||
|
|
|
@ -25,23 +25,6 @@ class UserPortfolioRoleChoices(models.TextChoices):
|
|||
logger.warning(f"Invalid portfolio role: {user_portfolio_role}")
|
||||
return f"Unknown ({user_portfolio_role})"
|
||||
|
||||
@classmethod
|
||||
def get_role_description(cls, user_portfolio_role):
|
||||
"""Returns a detailed description for a given role."""
|
||||
descriptions = {
|
||||
cls.ORGANIZATION_ADMIN: (
|
||||
"Grants this member access to the organization-wide information "
|
||||
"on domains, domain requests, and members. Domain management can be assigned separately."
|
||||
),
|
||||
cls.ORGANIZATION_MEMBER: (
|
||||
"Grants this member access to the organization. They can be given extra permissions to view all "
|
||||
"organization domain requests and submit domain requests on behalf of the organization. Basic access "
|
||||
"members can’t view all members of an organization or manage them. "
|
||||
"Domain management can be assigned separately."
|
||||
),
|
||||
}
|
||||
return descriptions.get(user_portfolio_role)
|
||||
|
||||
|
||||
class UserPortfolioPermissionChoices(models.TextChoices):
|
||||
""" """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue