mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 17:47:02 +02:00
small refactor
This commit is contained in:
parent
d51649dfba
commit
e9ba08f20a
6 changed files with 61 additions and 72 deletions
|
@ -92,6 +92,8 @@ class UserResource(resources.ModelResource):
|
|||
|
||||
|
||||
class FilteredSelectMultipleArrayWidget(FilteredSelectMultiple):
|
||||
"""Custom widget to allow for editing an ArrayField in a widget similar to filter_horizontal widget"""
|
||||
|
||||
def __init__(self, verbose_name, is_stacked=False, choices=(), **kwargs):
|
||||
super().__init__(verbose_name, is_stacked, **kwargs)
|
||||
self.choices = choices
|
||||
|
@ -655,10 +657,6 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
|
|||
"status",
|
||||
)
|
||||
|
||||
# For each filter_horizontal, init in admin js extendFilterHorizontalWidgets
|
||||
# to activate the edit/delete/view buttons
|
||||
# filter_horizontal = ("portfolio_roles",)
|
||||
|
||||
# Renames inherited AbstractUser label 'email_address to 'email'
|
||||
def formfield_for_dbfield(self, dbfield, **kwargs):
|
||||
field = super().formfield_for_dbfield(dbfield, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue