Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10651 closed (fixed)

auth app add user page causes javascript error due to admin change_form assuming presence of adminform object

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

Description

The contrib.auth add user page (add_form.html) causes a javascript error. This is due to the extended change_form.html inserting the following because of a missing adminform object in the context:

<script type="text/javascript">document.getElementById("").focus();</script>

The attached patch fixes this by having change_form.html check for presence of adminform and skipping the above line if it isn't present (which is correct because add_form.html has a hard-coded version of the same JS to set focus to the username field).

Attachments (2)

gltailpatch (3.7 KB) - added by seanl 6 years ago.
10651-change-form-checks-for-adminform-object.diff (490 bytes) - added by seanl 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by seanl

comment:1 Changed 6 years ago by seanl

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

Please ignore first patch labelled 'gltailpatch' - operator error.

comment:2 Changed 6 years ago by jacob

  • milestone set to 1.1
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by jacob

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 6 years ago by jacob

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

(In [10714]) Fixed #10651: fixed a javascript error on the admin user add form. Thanks, seanl.

comment:5 Changed 6 years ago by jacob

(In [10715]) [1.0.X] Fixed #10651: fixed a javascript error on the admin user add form. Thanks, seanl. Backport of [10714] from trunk.

comment:6 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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