Skip to content

Commit

Permalink
10829 fix top edit selected button
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson authored and jeremystretch committed Nov 4, 2022
1 parent 271d524 commit 43da786
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions netbox/templates/generic/object_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,64 +67,65 @@
{% applied_filters filter_form request.GET %}
{% endif %}

{# "Select all" form #}
{% if table.paginator.num_pages > 1 %}
<div id="select-all-box" class="d-none card noprint">
<form method="post" class="form col-md-12">
{% csrf_token %}
<div class="card-body">
<div class="float-end">
{% if 'bulk_edit' in actions %}
{% bulk_edit_button model query_params=request.GET %}
{% endif %}
{% if 'bulk_delete' in actions %}
{% bulk_delete_button model query_params=request.GET %}
{% endif %}
</div>
<div class="form-check">
<input type="checkbox" id="select-all" name="_all" class="form-check-input" />
<label for="select-all" class="form-check-label">
Select <strong>all {{ table.rows|length }} {{ table.data.verbose_name_plural }}</strong> matching query
</label>
<form method="post" class="form form-horizontal">
{% csrf_token %}
{# "Select all" form #}
{% if table.paginator.num_pages > 1 %}
<div id="select-all-box" class="d-none card noprint">
<div class="form col-md-12">
<div class="card-body">
<div class="float-end">
{% if 'bulk_edit' in actions %}
{% bulk_edit_button model query_params=request.GET %}
{% endif %}
{% if 'bulk_delete' in actions %}
{% bulk_delete_button model query_params=request.GET %}
{% endif %}
</div>
<div class="form-check">
<input type="checkbox" id="select-all" name="_all" class="form-check-input" />
<label for="select-all" class="form-check-label">
Select <strong>all {{ table.rows|length }} {{ table.data.verbose_name_plural }}</strong> matching query
</label>
</div>
</div>
</div>
</form>
</div>
{% endif %}
</div>
{% endif %}

{# Object table controls #}
{% include 'inc/table_controls_htmx.html' with table_modal="ObjectTable_config" %}
{# Object table controls #}
{% include 'inc/table_controls_htmx.html' with table_modal="ObjectTable_config" %}

<form method="post" class="form form-horizontal">
{% csrf_token %}
<input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
<div class="form form-horizontal">
{% csrf_token %}
<input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />

{# Object table #}
{# Object table #}

{% if prerequisite_model %}
{% include 'inc/missing_prerequisites.html' %}
{% endif %}
{% if prerequisite_model %}
{% include 'inc/missing_prerequisites.html' %}
{% endif %}

<div class="card">
<div class="card-body" id="object_list">
{% include 'htmx/table.html' %}
<div class="card">
<div class="card-body" id="object_list">
{% include 'htmx/table.html' %}
</div>
</div>
</div>

{# Form buttons #}
<div class="noprint bulk-buttons">
<div class="bulk-button-group">
{% block bulk_buttons %}
{% if 'bulk_edit' in actions %}
{% bulk_edit_button model query_params=request.GET %}
{% endif %}
{% if 'bulk_delete' in actions %}
{% bulk_delete_button model query_params=request.GET %}
{% endif %}
{% endblock %}
{# Form buttons #}
<div class="noprint bulk-buttons">
<div class="bulk-button-group">
{% block bulk_buttons %}
{% if 'bulk_edit' in actions %}
{% bulk_edit_button model query_params=request.GET %}
{% endif %}
{% if 'bulk_delete' in actions %}
{% bulk_delete_button model query_params=request.GET %}
{% endif %}
{% endblock %}
</div>
</div>
</div>

</form>

</div>
Expand Down

0 comments on commit 43da786

Please sign in to comment.