Opened 14 years ago

Closed 13 years ago

#15956 closed Cleanup/optimization (duplicate)

When all fields are read-only, don't show save/"change"/etc.

Reported by: joestump Owned by: nobody
Component: contrib.admin Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

I recently created an admin form where I wanted to set ALL of the fields in said admin form (a ModelAdmin) to read-only. Basically, I just wanted a simple "viewer" for each of these records (credit card transaction results from Authorize.Net so I don't exactly want people changing auth codes, transaction ID's, etc.). When I go to a record I see the following UI elements that are somewhat out of place:

  • Save and add another
  • Save and continue editing
  • Save
  • The header "Change transaction" (should probably say "View transaction" or simply the result of unicode for the object)

Delete is also somewhat out of place here. Might make sense to default has_delete_permission() to return False when all fields are marked as read-only.

Change History (3)

comment:1 by Aymeric Augustin, 14 years ago

Triage Stage: UnreviewedDesign decision needed

There has been a lot of talk about a "read-only" admin. This suggestion partially solves the problem, but I am not sure it's a good path.

comment:2 by Julien Phalip, 13 years ago

UI/UX: set

comment:3 by Julien Phalip, 13 years ago

Resolution: duplicate
Status: newclosed

As pointed by aaugustin, the use case and problems reported here are part of a bigger picture, i.e. enabling a read-only admin, that is already looked at in #8936. Thus, I'm closing this ticket as a duplicate.

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