Opened 16 years ago

Closed 16 years ago

Last modified 13 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: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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

Download all attachments as: .zip

Change History (8)

by Sean Legassick, 16 years ago

Attachment: gltailpatch added

comment:1 by Sean Legassick, 16 years ago

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

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 by Jacob, 16 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Jacob, 16 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by Jacob, 16 years ago

(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 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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