remove if clauses for int and float in edit_book.html

This commit is contained in:
Cervinko Cera
2016-04-20 23:53:55 +02:00
parent 27d5a79efb
commit f57c9c5951
2 changed files with 11 additions and 16 deletions
+5 -10
View File
@@ -67,18 +67,13 @@
</select>
{% endif %}
{% if c.datatype == ('rating' or 'float' or 'int') %}
<input type="number"
{% if c.datatype == 'rating'%}
min="1" max="5"
{% endif %}
{% if c.datatype != 'float' %}
step="1"
{% endif %}
class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
{% 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 %}"{% endif %}>
value="{{ column.value }}{% if not loop.last %}, {% endif %}
{% endfor %}"
{% endif %}>
{% endif %}
</div>
{% endfor %}