mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-22 04:24:51 +00:00
smaller default size for newforms floats and ints
This commit is contained in:
parent
35ebf57060
commit
ab8362432b
1 changed files with 12 additions and 0 deletions
|
@ -209,6 +209,10 @@ class DelugeInt(newforms.IntegerField):
|
|||
value = -1
|
||||
return int(newforms.IntegerField.clean(self, value))
|
||||
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
|
||||
class DelugeFloat(DelugeInt):
|
||||
def clean(self, value):
|
||||
try:
|
||||
|
@ -217,6 +221,14 @@ class DelugeFloat(DelugeInt):
|
|||
pass
|
||||
return float(DelugeInt.clean(self, value))
|
||||
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
class FloatField(newforms.FloatField):
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
|
||||
|
||||
class StringList(Field):
|
||||
"""for a list of strings """
|
||||
|
|
Loading…
Add table
Reference in a new issue