123456789101112 |
- {% macro input(fieldname, field, value='') -%}
- <label for="field_input_{{fieldname}}">{{fieldname}}</label>
- {% if field.base_type == 'bool' %}
- <input id="field_input_{{fieldname}}" name="field_input_{{fieldname}}" type="checkbox" checked="{% if value %}checked{% endif %}" />
- {% elif field.base_type == 'char' or field.base_type == 'int' %}
- <input id="{{fieldname}}" name="field_input_{{fieldname}}" type="text" value="{{value}}" />
-
-
- {% else %}
- Unsupported base type "{{field.base_type}}" </br>
- {% endif %}
- {%- endmacro %}
|