Commits

Panayiotis Lipiridis committed b7c907c Merge

Merged with gae-init

Comments (0)

Files changed (2)

 
 """
 
-__version__ = '0.16.4'
+__version__ = '0.16.5'

main/templates/macro/forms.html

 # endmacro
 
 
-# macro multiple_checkbox_field(field)
+# macro list_input_field(field, type)
   <div class="form-group {{'has-error' if field.errors}}">
     {{field.label(class='control-label')}}
     {{field_description(field)}}
     # for key, value in field.choices
-      <div class="checkbox">
+      <div class="{{type}}">
         <label>
-          <input type="checkbox" name="{{field.name}}" value="{{key}}"
+          <input type="{{type}}" name="{{field.name}}" value="{{key}}"
             # if field.data and key in field.data
               checked
             # endif
 # endmacro
 
 
+# macro multiple_checkbox_field(field)
+  {{list_input_field(field, 'checkbox')}}
+# endmacro
+
+
+# macro radio_field(field)
+  {{list_input_field(field, 'radio')}}
+# endmacro
+
 # macro oauth_fields(name, fields, checkmark, help)
   <div class="panel panel-default">
     <div class="panel-heading">