Skip to content

Commit

Permalink
resolve select all button not working
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyq committed Jan 18, 2023
1 parent 7cb418a commit cc916f8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions django_admin_bootstrapped/templates/admin/actions.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@

{% load i18n bootstrapped_goodies_tags %}
<div class="actions form-group">
{% for field in action_form %}{% if field.label %}<span style="vertical-align:sub">{{ field.label }}</span> {% endif %}{% dab_field_rendering field %}{% endfor %}
<button type="submit" class="btn btn-default" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button>
{% block actions %}
{% block actions-form %}
{% for field in action_form %}{% if field.label %}<span>{{ field.label }}</span> {% endif %}{% dab_field_rendering field %}{% endfor %} {% endblock %}
{% block actions-submit %}
<button type="submit" class="btn btn-default" style="margin-bottom: 5px;" title="{% translate "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% translate "Go" %}</button>
{% endblock %}
{% block actions-counter %}
{% if actions_selection_counter %}
<script type="text/javascript">var _actions_icnt="{{ cl.result_list|length|default:"0" }}";</script>
<span class="action-counter">{{ selection_note }}</span>
<span class="action-counter" data-actions-icnt="{{ cl.result_list|length }}">{{ selection_note }}</span>
{% if cl.result_count != cl.result_list|length %}
<span class="all" style="vertical-align:sub">{{ selection_note_all }}</span>
<span class="question"><a class="btn btn-default" href="javascript:;" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktrans %}</a></span>
<span class="clear"><a class="btn btn-default" href="javascript:;">{% trans "Clear selection" %}</a></span>
<span class="all hidden">{{ selection_note_all }}</span>
<span class="question hidden">
<a class="btn btn-default" href="#" title="{% translate "Click here to select the objects across all pages" %}">{% blocktranslate with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktranslate %}</a>
</span>
<span class="clear hidden"><a class="btn btn-default" href="#">{% translate "Clear selection" %}</a></span>
{% endif %}
{% endif %}
{% endblock %}
{% endblock %}
</div>

0 comments on commit cc916f8

Please sign in to comment.