Opened 11 years ago

Closed 10 years ago

#1568 closed defect (wontfix)

[patch] CharFields with small maxlength are still displayed with a size of 30

Reported by: RahmCoff@… Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: trivial 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

All of the CharFields are displayed as text input fields with a size of 30, even when the maxlength is much smaller. This can create confusion when the user is unable to type letters in an almost empty field.

Attachments (1)

charfield_size.diff (961 bytes) - added by LawrenceOluyede 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by asmodai@…

Version: SVN

This is indeed true for the SVN branch.

Changed 10 years ago by LawrenceOluyede

Attachment: charfield_size.diff added

comment:2 Changed 10 years ago by LawrenceOluyede

Summary: CharFields with small maxlength are still displayed with a size of 30[patch] CharFields with small maxlength are still displayed with a size of 30

comment:3 Changed 10 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedReady for checkin

comment:4 Changed 10 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

The oldforms package has been end-of-lifed now, so we are not going to be applying any further enhancements like this to it. We do want to check that the same problem doesn't appear on newforms, though.

[For the record, there is a problem with this patch as it stands: it should only trim the length for really short fields. Otherwise, a field with a maxlength of 200 will destroy the form layout. So some kind of check that it only adjusts the length to maxlength if maxlength < 30 would be required. That is why self.length exists in the first place. It should also probably have had a minimum of 2 or 3 on the length.]

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