Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#12704 closed (duplicate)

Wrong interpretation of extra clause in ModelAdmin with new admin UI

Reported by: russellm Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: apollo13 Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The new javascript-enabled admin UI appears have an unusual interpretation of the 'extra' clause on a ModelAdmin.

The current code interprets 'extra = N' as "allow the user to add no more than N extra rows. The user must press (+ add another XXX) to add the first inline.

I would have thought the interpretation would have been "instantiate the form with with N empty extra rows". The task of constraining the number of allowed inlines is the job of the 'max_num' clause.

The admin UI should always show N blank inputs (for extra = N), as long as that wouldn't exceed the max_num. The user should be able to fill in up to N inlines before needing to press the (+ add another) button.

If I'm incorrect, then the second failing test reported by #12703 needs to be fixed by accounting for the 5 fields (and missing default date) that are no longer on the form.

Change History (4)

comment:1 Changed 5 years ago by russellm

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 5 years ago by russellm

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

Duplicate of #12692.

comment:3 Changed 5 years ago by apollo13

  • Cc apollo13 added

comment:4 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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