예제 #1
0
 def __init__(self, *args, **kwargs):
     super(ActivityIntervalForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_tag = False
     self.helper.layout = Layout(
         Row(Column('interval', css_class='small-4'),
             Column(LabelSubmit('submit',
                                'Recheck activity',
                                css_class='postfix'),
                    css_class='small-8'),
             css_class='collapse'))
예제 #2
0
 def __init__(self, *args, **kwargs):
     super(VlanFilterForm, self).__init__(*args, **kwargs)
     col_class = 'medium-3'
     self.helper = FormHelper()
     self.helper.form_action = ''
     self.helper.form_method = 'GET'
     self.helper.form_class = 'custom'
     self.helper.layout = Layout(
         Fieldset(
             'Filter vlans',
             Row(
                 Column('net_type', css_class=col_class),
                 Column('organization', css_class=col_class),
                 Column('usage', css_class=col_class),
                 Column(LabelSubmit('submit', 'Filter',
                                    css_class='postfix'),
                        css_class=col_class))))
예제 #3
0
    def __init__(self, *args, **kwargs):
        super(NetboxFilterForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_action = ''
        self.helper.form_method = 'GET'
        self.helper.form_class = 'custom'

        self.helper.layout = Layout(
            Fieldset(
                'Filter devices',
                Row(
                    Column('category', css_class='medium-3'),
                    Column('room', css_class='medium-3'),
                    Column('organization', css_class='medium-3'),
                    Column(LabelSubmit('submit', 'Filter',
                                       css_class='postfix'),
                           css_class='medium-3'))))
예제 #4
0
파일: forms.py 프로젝트: wujcheng/nav
 def __init__(self, *args, **kwargs):
     super(ViewForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_class = 'custom'
     self.helper.form_action = ''
     self.helper.form_method = 'GET'
     self.helper.layout = Layout(
         Fieldset(
             'Choose statistic',
             Row(
                 Column('view', css_class='medium-5'),
                 Column('timeframe', css_class='medium-3'),
                 Column('rows', css_class='medium-1'),
                 Column(LabelSubmit('submit',
                                    'Show statistics',
                                    css_class='postfix'),
                        css_class='medium-3'),
             )))
예제 #5
0
def get_submit_button(value='Filter'):
    """Get default submit button for seeddb filter forms"""
    return LabelSubmit('submit', value, css_class='postfix')