diff --git a/netbox/project-static/js/forms.js b/netbox/project-static/js/forms.js index ff520a23f..59e1d8ff3 100644 --- a/netbox/project-static/js/forms.js +++ b/netbox/project-static/js/forms.js @@ -448,4 +448,29 @@ $(document).ready(function() { $('a.image-preview').on('mouseout', function() { $('#image-preview-window').fadeOut('fast'); }); + + // Rearrange options within a - + diff --git a/netbox/templates/utilities/obj_list.html b/netbox/templates/utilities/obj_list.html index ea28c7682..4cfa8b1ce 100644 --- a/netbox/templates/utilities/obj_list.html +++ b/netbox/templates/utilities/obj_list.html @@ -5,6 +5,9 @@ {% block content %}
{% block buttons %}{% endblock %} + {% if table_config_form %} + + {% endif %} {% if permissions.add and 'add' in action_buttons %} {% add_button content_type.model_class|url_name:"add" %} {% endif %} @@ -18,9 +21,6 @@

{% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %}

- {% if table_config_form %} - {% include 'inc/table_config_form.html' %} - {% endif %} {% with bulk_edit_url=content_type.model_class|url_name:"bulk_edit" bulk_delete_url=content_type.model_class|url_name:"bulk_delete" %} {% if permissions.change or permissions.delete %}
@@ -71,6 +71,9 @@ {% endwith %} {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
+ {% if table_config_form %} + {% include 'inc/table_config_form.html' %} + {% endif %}
{% if filter_form %}
diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index e0ce09997..c1d925999 100644 --- a/netbox/utilities/forms.py +++ b/netbox/utilities/forms.py @@ -765,7 +765,8 @@ class TableConfigForm(BootstrapMixin, forms.Form): choices=[], widget=forms.SelectMultiple( attrs={'size': 10} - ) + ), + help_text="Use the buttons below to arrange columns in the desired order, then select all columns to display." ) def __init__(self, table, *args, **kwargs): diff --git a/netbox/utilities/views.py b/netbox/utilities/views.py index 8b4942201..eca124a4a 100644 --- a/netbox/utilities/views.py +++ b/netbox/utilities/views.py @@ -202,7 +202,7 @@ class ObjectListView(View): request.user.config.clear(preference_name, commit=True) messages.success(request, "Your preferences have been updated.") - return redirect(request.path) + return redirect(request.get_full_path()) def alter_queryset(self, request): # .all() is necessary to avoid caching queries