Beispiel #1
0
    def helper(self):
        helper = FormHelper()
        helper.form_class = 'form-horizontal datacenter-search-form'
        helper.label_class = 'col-lg-4'
        # self.helper.field_template = 'bootstrap3/layout/inline_field.html'
        helper.field_class = 'col-lg-8'
        wc = 'form-group-sm col-lg-6 col-md-6 col-sm-12 row'
        helper.wrapper_class = wc
        helper.form_method = 'get'

        helper.layout = Layout(

                Div(Fieldset(_('Search Projects'),
                             Field('name', wrapper_class=wc),
                             Field('act', css_class="", wrapper_class=wc),
                             Field('inv', css_class="", wrapper_class=wc),
                             Field('ben', css_class="", wrapper_class=wc),
                             Field('inactive', css_class="", wrapper_class=wc),
                             Field('status', css_class="", wrapper_class=wc),
                             Field('orgtype', css_class="applyselectize", wrapper_class=wc),
                             Field('enddateafter', css_class="datepicker", wrapper_class=wc),
                             Field('startdateafter', css_class="datepicker", wrapper_class=wc),
                             Field('pcode', wrapper_class=wc)
                             ),
                    Submit('search', u_('Search'), css_class="btn btn-success btn"),
                    )
        )

        return helper
Beispiel #2
0
    def helper(self):

        helper = FormHelper()
        helper.form_class = 'form-horizontal datacenter-search-form'
        helper.label_class = 'col-lg-4'
        helper.field_class = 'col-lg-8'
        helper.form_method = 'get'
        helper.wrapper_class = 'form-group-sm col-lg-6 col-md-6 col-sm-12 row'
        helper.layout = Layout(
                Fieldset(_("Search for Publications"),
                         Field('tag__id', wrapper_class=helper.wrapper_class,
                               data_selecturl="/selecttwo/library/tag/name/icontains/"),
                         Field('text', wrapper_class=helper.wrapper_class),
                         Field('organization', wrapper_class=helper.wrapper_class),
                         Field('sector__path', wrapper_class=helper.wrapper_class),
                         # Field('inv', wrapper_class=self.helper.wrapper_class),
                         Field('pubtype', wrapper_class=helper.wrapper_class),
                         Field('language_id', wrapper_class=helper.wrapper_class),
                         Field('year', wrapper_class=helper.wrapper_class, attrs={'maxItems': 2}),
                         Field('primary', wrapper_class=helper.wrapper_class),
                         ),
                Submit('search', u_('Search'), css_class="btn btn-success btn"),
        )
        return helper