Fix #1500 (Custom ratings of increment 0.5 are allowed)

This commit is contained in:
Ozzieisaacs
2020-07-05 14:35:57 +02:00
parent d1889a5e06
commit f80c67828b
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -159,9 +159,9 @@
{% endif %}
{% 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 }}"
<input type="number" min="1" max="5" step="0.5" class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
{% if book['custom_column_' ~ c.id]|length > 0 %}
value="{{ '%d' % (book['custom_column_' ~ c.id][0].value / 2) }}"
value="{{ '%.1f' % (book['custom_column_' ~ c.id][0].value / 2) }}"
{% endif %}>
{% endif %}
</div>