Browse Source

Bugfix in webui

Deleted hardcoded Object class name + adding support for varchar & text
in editable_component template
Yann Weber 7 years ago
parent
commit
cad6962fea

+ 1
- 1
lodel/plugins/webui/interface/controllers/admin.py View File

@@ -130,7 +130,7 @@ def admin_create(request):
130 130
             raise HttpException(400)
131 131
         classname = classname[0]
132 132
         try:
133
-            target_leo = dyncode.Object.name2class(classname)
133
+            target_leo = dyncode.dynclasses[0].name2class(classname)
134 134
         except LeApiError:
135 135
             classname = None
136 136
 

+ 3
- 1
lodel/plugins/webui/templates/admin/editable_component.html View File

@@ -8,8 +8,10 @@
8 8
 		<input id="field_input_{{fieldname}}" class="form-control" name="field_input_{{fieldname}}" type="checkbox" checked="{% if value %}checked{% endif %}" >
9 9
 	{% elif field.base_type == 'password' %}
10 10
             <input id="{{fieldname}}" name="field_input_{{fieldname}}" class="form-control" type="password"  value="{{sval}}" >
11
-    {% elif field.base_type == 'char' or field.base_type == 'int' %}
11
+    {% elif field.base_type == 'char' or field.base_type == 'int' or field.base_type == 'varchar' %}
12 12
 		<input id="{{fieldname}}" class="form-control" name="field_input_{{fieldname}}" type="text" value="{{value}}" >
13
+    {% elif field.base_type == 'text' %}
14
+		<textarea id="{{fieldname}}" class="form-control" name="field_input_{{fieldname}}"></textarea>
13 15
     {% elif field.base_type == 'ref' %}
14 16
         {% if value is iterable %}
15 17
             {% set sval=value|join(',') %}

Loading…
Cancel
Save