1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-10-31 03:29:03 +01:00
lodel2_mirror/plugins/webui/templates/admin/editable_component.html
2016-07-01 15:23:15 +02:00

10 lines
481 B
HTML

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