diff options
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r-- | ishtar_common/forms.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 9c81fa04b..88a3306f4 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -105,6 +105,11 @@ class FormSet(BaseFormSet): form.fields[DELETION_FIELD_NAME].widget = widgets.DeleteWidget() class TableSelect(forms.Form): + def __init__(self, *args, **kwargs): + super(TableSelect, self).__init__(*args, **kwargs) + key = self.fields.keyOrder[0] + self.fields[key].widget.attrs['autofocus'] = 'autofocus' + def get_input_ids(self): return self.fields.keys() |