Opened 7 years ago

Closed 7 years ago

#9514 closed (fixed)

Two admin templates incorrectly use errors.items

Reported by: kmtracey Owned by: kmtracey
Component: contrib.admin Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


This thread:

points out that the admin change_form.html uses errors.items|length, which is incorrect. errors is a list type; errors|length would seem to be what should be used. As is is now the plural message is always displayed even when there is only a single error on the page. grep shows admin/auth/user/change_password.html uses the same construct and probably also needs to be fixed.

Change History (2)

comment:1 Changed 7 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to kmtracey
  • Patch needs improvement unset
  • Status changed from new to assigned

admin/auth/user/change_password.html is OK, it's actually using form.errors which is a dict. Just the admin change_form.html has the problem.

comment:2 Changed 7 years ago by kmtracey

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

(In [9371]) Fixed #9514 -- Made admin change_form template correctly recognize/report when a form has only a single error.

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