forked from rDrama/rDrama
1
0
Fork 0
master
kek7198 2021-12-21 23:16:34 -06:00
parent 9e28a33c89
commit 76981baebb
2 changed files with 20 additions and 15 deletions

View File

@ -1,13 +1,16 @@
{% for c in p.bet_options %}
<span id="span-{{c.id}}" {% if c.poll_voted(v) %}class="bet_voted"{% endif %}>
<input {% if c.poll_voted(v) %}checked{% endif %} class="bet" {% if not (v and v.coins > 200) or p.total_bet_voted(v) %}disabled{% endif %} type="radio" id="{{c.id}}" onchange="bet_vote('{{c.id}}')">
</span>
<label for="{{c.id}}">
{{c.body_html | safe}} -
<a href="/votes?link=t3_{{c.id}}">
<span id="bet-{{c.id}}">{{c.upvotes}}</span> bets
</a>
{% if not p.total_bet_voted(v) %} (cost of entry: 200 coins){% endif %}
</label>
<br>
{% endfor %}
<ul class="mb-0 list-none">
{% for c in p.bet_options %}
<li>
<span id="span-{{c.id}}" {% if c.poll_voted(v) %}class="bet_voted"{% endif %}>
<input type="radio" id="{{c.id}}" {% if c.poll_voted(v) %}checked{% endif %} class="bet" onchange="bet_vote('{{c.id}}')" {% if not (v and v.coins > 200) or p.total_bet_voted(v) %}disabled{% endif %}>
</span>
<label for="{{c.id}}">
{{c.body_html | safe}} -
<a href="/votes?link=t3_{{c.id}}">
<span id="bet-{{c.id}}">{{c.upvotes}}</span> bets
</a>
{% if not p.total_bet_voted(v) %} (cost of entry: 200 coins){% endif %}
</label>
</li>
{% endfor %}
</ul>

View File

@ -2,11 +2,13 @@
<ul class="flex flex-col space-y-2 mb-0">
{% for c in p.options %}
<li>
<input type="checkbox" id="{{c.id}}" name="option" {% if c.poll_voted(v) %}checked{% endif %} onchange="poll_vote('{{c.id}}')">
<label class="inline-block pl-2 text-black" for="{{c.id}}">{{c.body_html | safe}} -
<input type="checkbox" id="{{c.id}}" name="option" {% if c.poll_voted(v) %}checked{% endif %} onchange="{% if v %}poll_vote('{{c.id}}'){% else %}poll_vote_no_v(){% endif %}">
<label class="inline-block pl-2 text-black" for="{{c.id}}">{{c.body_html | safe}}
<span class="presult {% if not p.total_poll_voted(v) %}hidden{% endif %}"> -
<a href="/votes?link=t3_{{c.id}}" class="font-bold text-gray-600 hover:text-red-600">
<span id="poll-{{c.id}}">{{c.upvotes}}</span> votes
</a>
</span>
</label>
</li>
{% endfor %}