Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#34315 closed Bug (fixed)

Close button read only changeview of admin does not preserve filters

Reported by: Jan Hošek Owned by: Rahmat Faisal
Component: contrib.admin Version: 4.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Save and Delete buttons in change view of admin send you back to list view with preserved filters. In some cases (for example user does not have change permission) there is Close button instead of save buttons.

Suggested change to make the behavior of Close button consistent with Save is in template:
contrib/admin/templates/admin/submit_line.html

{% if show_close %}
    {% url opts|admin_urlname:'changelist' as close_url %}
    <a href="{% add_preserved_filters close_url %}" class="closelink">{% translate 'Close' %}</a>
{% endif %}

Change History (8)

comment:1 by Rahmat Faisal, 16 months ago

Owner: changed from nobody to Rahmat Faisal
Status: newassigned

comment:2 by Rahmat Faisal, 16 months ago

gonna look

comment:3 by Mariusz Felisiak, 16 months ago

Triage Stage: UnreviewedAccepted

Thanks for the report.

comment:4 by Baha Sdtbekov, 16 months ago

comment:5 by Mariusz Felisiak, 16 months ago

Has patch: set
Needs tests: set

comment:6 by Mariusz Felisiak, 16 months ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 16 months ago

Resolution: fixed
Status: assignedclosed

In 325c44a:

Fixed #34315 -- Preserved admin changelist filters on "Close" button.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 16 months ago

In 1f193f7:

[4.2.x] Fixed #34315 -- Preserved admin changelist filters on "Close" button.

Backport of 325c44ac6c070465ef2b3b7b8ed06cbcb88a3f10 from main

Note: See TracTickets for help on using tickets.
Back to Top