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'))
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))))
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'))))
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'), )))
def get_submit_button(value='Filter'): """Get default submit button for seeddb filter forms""" return LabelSubmit('submit', value, css_class='postfix')