From cde0d527ce7251e9073a66b053034d9657937ecb Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:59:44 -0600 Subject: [PATCH] PR cleanup --- src/registrar/context_processors.py | 2 -- src/registrar/forms/domain.py | 2 -- src/registrar/models/utility/portfolio_helper.py | 1 - src/registrar/templates/django/forms/widgets/combobox.html | 7 +++++++ src/registrar/views/domain.py | 5 +---- src/registrar/views/portfolios.py | 2 -- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 36706edc9..ee5f8aee1 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -66,7 +66,6 @@ def portfolio_permissions(request): "has_base_portfolio_permission": False, "has_domains_portfolio_permission": False, "has_domain_requests_portfolio_permission": False, - "has_edit_org_portfolio_permission": False, "portfolio": None, "has_organization_feature_flag": False, } @@ -74,7 +73,6 @@ def portfolio_permissions(request): "has_base_portfolio_permission": request.user.has_base_portfolio_permission(), "has_domains_portfolio_permission": request.user.has_domains_portfolio_permission(), "has_domain_requests_portfolio_permission": request.user.has_domain_requests_portfolio_permission(), - "has_edit_org_portfolio_permission": request.user.has_edit_org_portfolio_permission(), "portfolio": request.user.portfolio, "has_organization_feature_flag": True, } diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index ec29f4032..ec370f268 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -170,8 +170,6 @@ class DomainSuborganizationForm(forms.ModelForm): ] def __init__(self, *args, **kwargs): - # Get the incoming request object - self.request = kwargs.pop("request", None) super().__init__(*args, **kwargs) portfolio = self.instance.portfolio if self.instance else None diff --git a/src/registrar/models/utility/portfolio_helper.py b/src/registrar/models/utility/portfolio_helper.py index 2edca3422..86aaa5e16 100644 --- a/src/registrar/models/utility/portfolio_helper.py +++ b/src/registrar/models/utility/portfolio_helper.py @@ -27,7 +27,6 @@ class UserPortfolioPermissionChoices(models.TextChoices): VIEW_PORTFOLIO = "view_portfolio", "View organization" EDIT_PORTFOLIO = "edit_portfolio", "Edit organization" - # TODO - think of other solutions # Domain: field specific permissions VIEW_SUBORGANIZATION = "view_suborganization", "View suborganization" EDIT_SUBORGANIZATION = "edit_suborganization", "Edit suborganization" diff --git a/src/registrar/templates/django/forms/widgets/combobox.html b/src/registrar/templates/django/forms/widgets/combobox.html index c53fdc816..107c2e14e 100644 --- a/src/registrar/templates/django/forms/widgets/combobox.html +++ b/src/registrar/templates/django/forms/widgets/combobox.html @@ -1,3 +1,10 @@ +{% comment %} +This is a custom widget for USWDS's comboboxes. +USWDS comboboxes are basically just selects with a "usa-combo-box" div wrapper. +We can further customize these by applying attributes to this parent element, +for now we just carry the attribute to both the parent element and the select. +{% endcomment %} +