#22894 closed Cleanup/optimization (fixed)

make admin add related behaviour customizable

Reported by: rm_ Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

Decouple behaviour and style from the RelatedFieldWidgetWrapper widget so it's easier to customize.
This makes life easier for people that want to say use a modal or just style it differently.

While at it in change_form.html start consolidating document ready event listeners in one place.

Change History (6)

comment:1 Changed 12 months ago by rm_

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 12 months ago by rm_

If change looks ok i've done the same for raw_id_fields widget and unified common js code here https://github.com/xrmx/django/commits/morepopupcleanup

comment:3 Changed 12 months ago by timo

Yes, please add it to the PR and I'll add some comments.

comment:4 Changed 12 months ago by timo

  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 12 months ago by rm_

Thanks for the review Tim, pull requests updated with these changes:

  • added title to <a>
  • splitted css blocks
  • renamed template block
  • splitted long lines in tests

comment:6 Changed 12 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 68c9a72e29c929d896a25b3a0f566c09b6723dd4:

Fixed #22894 -- Made admin add related/raw ID fields widgets customizable.

Decoupled behavior and style from the RelatedFieldWidgetWrapper and
ForeignKeyRawIdWidget.

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