Opened 8 years ago

Closed 7 years ago

Last modified 5 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: Sean Legassick 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 Sean Legassick 8 years ago.
10651-change-form-checks-for-adminform-object.diff (490 bytes) - added by Sean Legassick 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Sean Legassick

Attachment: gltailpatch added

Changed 8 years ago by Sean Legassick

comment:1 Changed 8 years ago by Sean Legassick

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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

comment:2 Changed 7 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 Changed 7 years ago by Jacob

Triage Stage: AcceptedReady for checkin

comment:4 Changed 7 years ago by Jacob

Resolution: fixed
Status: newclosed

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

comment:5 Changed 7 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 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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