Commits

Andreas Kloeckner  committed e71b23c

Tweak forms templates to be able to add CSS classes to search form (Bootstrap support).

  • Participants
  • Parent commits e93d909

Comments (0)

Files changed (1)

File MoinMoin/templates/forms.html

   </fieldset>
 {% endmacro %}
 
-{% macro raw_input(field, type=none) %}
-  {{ gen.input(field, type=type or field.properties.widget, class=field.properties.class_ or '', **kwargs) }}
+{% macro raw_input(field, type=none, class_=none) %}
+  {{ gen.input(field, type=type or field.properties.widget, class_=class_ or field.properties.class_ or '', **kwargs) }}
 {% endmacro %}
 
 {% macro annotated_input(field, type=none) %}
   {{ annotated_input(field, 'text') }}
 {% endmacro %}
 
-{% macro search(field) %}
-  {{ raw_input(field, id='moin-search-query') }}
+{% macro search(field, class_="") %}
+  {{ raw_input(field, id='moin-search-query', class_=class_) }}
 {% endmacro %}
 
 {% macro select(field) %}