#8433 closed (fixed)
auth add_view popup
Reported by: | sorl | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
add_view should probably be:
if "_addanother" in request.POST: request.user.message_set.create(message=msg) return HttpResponseRedirect(request.path) + elif '_popup' in request.REQUEST: + return self.response_add(request, new_user) else: request.user.message_set.create(message=msg + ' ' + ugettext("You may edit it again below.")) return HttpResponseRedirect('../%s/' % new_user.id)
Attachments (1)
Change History (10)
comment:3 by , 16 years ago
milestone: | 1.0 maybe → 1.0 |
---|
Please explain more about why it should do this -- I can't tell from the patch what the problem is.
comment:4 by , 16 years ago
When FK to User in a model and you add a new user by clicking the green plus. If you don't check for popup you will be presented to editing the options for the user in the popup window, which doesn't look very good. The downside (which I think is ok since its a popup) is that you wont be presented to the options editing for the new user at all.
comment:5 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:6 by , 16 years ago
I can confirm this is an annoying bug (the new user is not added to the FK field in the admin interface after the popup is closed or after the user's details are saved). sorl's patch works, and I've attached a diff with it so it's easier to commit.
However, while the patch prevents the bug, you cannot edit the new user's details (first name, last name etc.). You'd need to edit those details separately at a later stage. A proper and long term solution would be to detect the popup in the change_view and treat the request as if it were an add, not a change.
comment:7 by , 16 years ago
Has patch: | set |
---|
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |