mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
pedagogy: correctly fill star widget when editing comment
This commit is contained in:
parent
38ef13d9b6
commit
d903dc58cf
@ -15,6 +15,7 @@
|
||||
|
||||
</style>
|
||||
|
||||
{# Do not vote button #}
|
||||
<label class="star">
|
||||
<input type="radio" name="{{ widget.name }}" value="-1" onclick='
|
||||
var stars = document.getElementsByClassName("{{ widget.name }}");
|
||||
@ -27,6 +28,8 @@
|
||||
' checked>
|
||||
<span class="fa fa-times-circle"> {{ translations.do_not_vote }}</span>
|
||||
</label>
|
||||
|
||||
{# Star widget #}
|
||||
{% for i in number_of_stars %}
|
||||
<label class="star">
|
||||
<input type="radio" name="{{ widget.name }}" value="{{ forloop.counter0 }}" onclick='
|
||||
@ -47,4 +50,9 @@
|
||||
</label>
|
||||
{% endfor %}
|
||||
|
||||
{# Restaure previous (-1 is default) #}
|
||||
<script type="text/javascript">
|
||||
document.querySelector("input[name='{{ widget.name }}'][value='{{ widget.value }}']").click()
|
||||
</script>
|
||||
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user