Revision 6ab72614
Corrections suite à l'analyse de Pylint.
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@1803 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigiboard/widgets/search_form.py | ||
---|---|---|
4 | 4 |
|
5 | 5 |
from pylons.i18n import lazy_ugettext as l_ |
6 | 6 |
from tw.forms import TableForm, TextField, CalendarDateTimePicker, SubmitButton |
7 |
from tw.api import WidgetsList |
|
8 |
from tg import url |
|
9 | 7 |
|
10 | 8 |
__all__ = ('SearchForm', ) |
11 | 9 |
|
... | ... | |
22 | 20 |
submit_text = None |
23 | 21 |
action = './' |
24 | 22 |
fields = [ |
25 |
TextField('hostgroup', label_text=l_('Host group')),
|
|
26 |
TextField('servicegroup', label_text=l_('Service group')),
|
|
27 |
TextField('host', label_text=l_('Host')),
|
|
28 |
TextField('service', label_text=l_('Service')),
|
|
29 |
TextField('output', label_text=l_('Output')),
|
|
30 |
TextField('trouble_ticket', label_text=l_('Trouble Ticket'))
|
|
23 |
TextField('hostgroup', label_text = l_('Host group')),
|
|
24 |
TextField('servicegroup', label_text = l_('Service group')),
|
|
25 |
TextField('host', label_text = l_('Host')),
|
|
26 |
TextField('service', label_text = l_('Service')),
|
|
27 |
TextField('output', label_text = l_('Output')),
|
|
28 |
TextField('trouble_ticket', label_text = l_('Trouble Ticket'))
|
|
31 | 29 |
] |
32 | 30 |
|
33 | 31 |
def __init__(self, id, lang, date_format='%Y-%m-%d %I:%M:%S %P', |
34 | 32 |
*args, **kwargs): |
35 |
super(SearchForm, self).__init__(id, *args, **kwargs)
|
|
33 |
TableForm.__init__(self, id, *args, **kwargs)
|
|
36 | 34 |
|
37 | 35 |
self.children.append(CalendarDateTimePicker(id + '_from_date', |
38 | 36 |
name = 'from_date', |
Also available in: Unified diff