Code

Opened 8 years ago

Closed 7 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
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 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by asmodai@…

  • Version set to SVN

This is indeed true for the SVN branch.

Changed 7 years ago by LawrenceOluyede

comment:2 Changed 7 years ago by LawrenceOluyede

  • Summary changed from CharFields with small maxlength are still displayed with a size of 30 to [patch] CharFields with small maxlength are still displayed with a size of 30

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

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:4 Changed 7 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

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.]

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.