Ticket #675: password_field.diff
File password_field.diff, 998 bytes (added by , 19 years ago) |
---|
-
django/core/formfields.py
247 247 248 248 class PasswordField(TextField): 249 249 def render(self, data): 250 maxlength = '' 251 if self.maxlength: 252 maxlength = 'maxlength="%s" ' % self.maxlength 250 253 # value is always blank because we never want to redisplay it 251 return '<input type="password" id="%s" class="v%s%s" name="%s" value=""/>' % \254 return '<input type="password" id="%s" class="v%s%s" name="%s" size="%s" value="" %s/>' % \ 252 255 (FORM_FIELD_ID_PREFIX + self.field_name, self.__class__.__name__, self.is_required and ' required' or '', 253 self.field_name )256 self.field_name, self.length, maxlength) 254 257 255 258 class LargeTextField(TextField): 256 259 def __init__(self, field_name, rows=10, cols=40, is_required=False, validator_list=[], maxlength=None):