Fix some compatibility and structure problems with admin templates.
Review Request #10956 — Created March 13, 2020 and submitted
The new revised administration UI templates left out some crucial blocks
that were necessary for some extensions to work, and broke the ability
to override the form submission buttons.This was largely due to an attempt to simplify the templates, removing
some Djangoisms that didn't appear to make sense, and to also utilize
some other Djangoisms for calculating state needed for form buttons.
What we had just wasn't comprehensive enough.What we're doing now is bringing back some of the blocks, fixing up some
bad assumptions with the buttons (and allowing them to be better
overridden), and also fixing some incorrect usage of some CSS components.There's also fixes to the form that previously caused dependencies on an
adminform
variable. Most of these are fixed in this change, with a fix
to media coming in a follow-up change.There's room for improvement here, particularly when it comes to the
form buttons. Eventually we'll want to move away from Django's
{% submit_row %}
template tag (which breaks if not working with
models), but that's a task for another day.
Tested the model change pages, settings pages, and the Power Pack
configuration page (which was broken before). They all now render as
expected.
Summary | ID |
---|---|
3f0835f3a6c5127aaed8521bb81666d983e1996d |
- Change Summary:
-
Fixed some other issues with the template involving
adminform
variables. - Description:
-
The new revised administration UI templates left out some crucial blocks
that were necessary for some extensions to work, and broke the ability to override the form submission buttons. This was largely due to an attempt to simplify the templates, removing
some Djangoisms that didn't appear to make sense, and to also utilize some other Djangoisms for calculating state needed for form buttons. What we had just wasn't comprehensive enough. What we're doing now is bringing back some of the blocks, fixing up some
bad assumptions with the buttons (and allowing them to be better overridden), and also fixing some incorrect usage of some CSS components. + There's also fixes to the form that previously caused dependencies on an
+ adminform
variable. Most of these are fixed in this change, with a fix+ to media coming in a follow-up change. + There's room for improvement here, particularly when it comes to the
form buttons. Eventually we'll want to move away from Django's {% submit_row %}
template tag (which breaks if not working withmodels), but that's a task for another day. - Commits:
-
Summary ID 4f7df2fa9d462aa09ae798d2b935f5d0d75a6bc4 3f0835f3a6c5127aaed8521bb81666d983e1996d