Code

Opened 7 years ago

Closed 7 years ago

#5407 closed (fixed)

raw_id ForeignKey field behaves like a ManyToManyField

Reported by: jkocherhans Owned by: xian
Component: contrib.admin Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jkocherhans)

Using the raw_id popup when the field is already populated results in each selected if being added with a comma. As a hint, this has to do with the field having a vRawIdAdminField class, which RelatedObjectLookup.js hooks on to. We should probably have 2 separate widgets, one for ForeignKey fields, and one for ManyToManyFields. Currently, they use the same raw_id widget.

Attachments (2)

many2manywidget.diff (4.2 KB) - added by xian 7 years ago.
many2manywidget.2.diff (4.3 KB) - added by xian 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by jkocherhans

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by jkocherhans

  • Owner changed from nobody to xian

comment:3 Changed 7 years ago by jkocherhans

  • Triage Stage changed from Unreviewed to Accepted

Changed 7 years ago by xian

Changed 7 years ago by xian

comment:4 Changed 7 years ago by jkocherhans

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

(In [6310]) newforms-admin: Fixed #5407. Javascript problems with raw_id fields. Thanks Christian Metts.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.