fix for custom column 'rating'

This commit is contained in:
Cervinko Cera
2016-04-21 12:46:26 +02:00
parent a21a9d6510
commit 931981a37a
2 changed files with 6 additions and 4 deletions
+1 -3
View File
@@ -70,9 +70,7 @@
{% if c.datatype == 'rating' %}
<input type="number" min="1" max="5" step="1" class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
{% if book['custom_column_' ~ c.id]|length > 0 %}
{% for column in book['custom_column_' ~ c.id] %}
value="{{ column.value }}{% if not loop.last %}, {% endif %}
{% endfor %}"
value="{{ book['custom_column_' ~ c.id][0].value / 2 }}"
{% endif %}>
{% endif %}
</div>