#36512 closed Bug (invalid)
The range of the pagination block on the admin ChangeList page is incorrect.
Reported by: | Antoliny | Owned by: | Antoliny |
---|---|---|---|
Component: | contrib.admin | Version: | 5.2 |
Severity: | Normal | Keywords: | changelist, pagination |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Recently, accessibility improvements were made to the ChangeList
pagination on the admin page.PR
As part of that process, the save button that was previously within the pagination block was separated.
However, the current pagination block still includes the save button within its range.
{% block pagination %} <div class="changelist-footer"> {% pagination cl %} {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %} {% endblock %} </div>
As a result, when overriding the template and customizing the contents of the pagination block, the save button may be unintentionally removed.
The range of the pagination block should be adjusted to include only the pagination template tags.
Change History (5)
comment:1 by , 2 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 2 months ago
Has patch: | set |
---|
comment:3 by , 2 months ago
follow-up: 5 comment:4 by , 2 months ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Previously the save button was included in django/contrib/admin/templates/admin/pagination.html
which was rendered via the pagination_tag
inside the pagination
template block
Since the recent accessibility changes, the save button is no longer in django/contrib/admin/templates/admin/pagination.html
but is still in the pagination template block
Given that when folks were overriding the pagination block before they would have had to have handled the save button, I think what we have currently is the most backwards compatible
comment:5 by , 2 months ago
Replying to Sarah Boyce:
Previously the save button was included in
django/contrib/admin/templates/admin/pagination.html
which was rendered via thepagination_tag
inside thepagination
template block
Since the recent accessibility changes, the save button is no longer indjango/contrib/admin/templates/admin/pagination.html
but is still in the pagination template block
Given that when folks were overriding the pagination block before they would have had to have handled the save button, I think what we have currently is the most backwards compatible
Ah, I hadn’t considered that.
Now that I think about it, to maintain backwards compatibility, it does make sense to keep the current structure since the input button was previously included within the pagination block.
PR