diff --git a/netbox/project-static/js/forms.js b/netbox/project-static/js/forms.js index f189adc1b..c3cb19bdf 100644 --- a/netbox/project-static/js/forms.js +++ b/netbox/project-static/js/forms.js @@ -160,9 +160,6 @@ $(document).ready(function() { offset: offset, }; - // Allow for controlling the brief setting from within APISelect - parameters.brief = ( $(element).is('[data-full]') ? undefined : true ); - // Attach any extra query parameters $.each(element.attributes, function(index, attr){ if (attr.name.includes("data-query-param-")){ diff --git a/netbox/utilities/forms/fields.py b/netbox/utilities/forms/fields.py index fdb012330..07481ed60 100644 --- a/netbox/utilities/forms/fields.py +++ b/netbox/utilities/forms/fields.py @@ -271,20 +271,18 @@ class DynamicModelChoiceMixin: :param null_option: The string used to represent a null selection (if any) :param disabled_indicator: The name of the field which, if populated, will disable selection of the choice (optional) - :param brief_mode: Use the "brief" format (?brief=true) when making API requests (default) """ filter = django_filters.ModelChoiceFilter widget = widgets.APISelect # TODO: Remove display_field in v2.12 def __init__(self, display_field='display', query_params=None, initial_params=None, null_option=None, - disabled_indicator=None, brief_mode=True, *args, **kwargs): + disabled_indicator=None, *args, **kwargs): self.display_field = display_field self.query_params = query_params or {} self.initial_params = initial_params or {} self.null_option = null_option self.disabled_indicator = disabled_indicator - self.brief_mode = brief_mode # to_field_name is set by ModelChoiceField.__init__(), but we need to set it early for reference # by widget_attrs() @@ -309,10 +307,6 @@ class DynamicModelChoiceMixin: if self.disabled_indicator is not None: attrs['disabled-indicator'] = self.disabled_indicator - # Toggle brief mode - if not self.brief_mode: - attrs['data-full'] = 'true' - # Attach any static query parameters for key, value in self.query_params.items(): widget.add_query_param(key, value)