Browse Source

Forgotten file

Yann Weber 8 years ago
parent
commit
ef8e1b0570
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      plugins/webui/templates/admin/editable_component.html

+ 10
- 0
plugins/webui/templates/admin/editable_component.html View File

@@ -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 %}

Loading…
Cancel
Save