diff --git a/deluge/ui/webui/lib/newforms_plus.py b/deluge/ui/webui/lib/newforms_plus.py index fbb34fe82..7b4e07e45 100644 --- a/deluge/ui/webui/lib/newforms_plus.py +++ b/deluge/ui/webui/lib/newforms_plus.py @@ -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 """