|
@@ -0,0 +1,10 @@
|
|
1
|
+{% macro input(fieldname, field, value='') -%}
|
|
2
|
+ <label for="field_input_{{fieldname}}">{{fieldname}}</label>
|
|
3
|
+ {% if field.base_type == 'bool' %}
|
|
4
|
+ <input id="field_input_{{fieldname}}" type="checkbox" checked="{% if value %}checked{% endif %}" />
|
|
5
|
+ {% elif field.base_type == 'char' or field.base_type == 'int' %}
|
|
6
|
+ <input id="field_input_{{fieldname}}" type="text" value="{{value}}" />
|
|
7
|
+ {% else %}
|
|
8
|
+ <p>Unsupported base type "{{field.base_type}}" </p>
|
|
9
|
+ {% endif %}
|
|
10
|
+{%- endmacro %}
|