each table element is identified by a key
[unfold.git] / rest / templates / table-default.html
index d8397ce..71ae083 100644 (file)
@@ -7,8 +7,8 @@
 </thead>
 <tbody>
 {% for d in data %}
-<tr id="{{ id }}">
-       {% if "checkbox" in options %}<td><input type="checkbox" name="{{ id }}" /></td>{% endif %}
+<tr id="{{ d|key:id }}">
+       {% if "checkbox" in options %}<td><input type="checkbox" name="{{ id }}" value="{{ d|key:id }}" /></td>{% endif %}
        {% for f in fields %}<td><div class="line1">{{ d|key:f }}</div></td>{% endfor %}
 </tr>
 {% endfor %}