summaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-05-29 19:01:27 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-05-29 19:01:27 +0200
commitcf94177eb06be4d7b9c2d677dea58ab3f0d7133e (patch)
treeabbda594b7aa2835e5a337baaa751a25358faf49 /templates/index.html
parent40d78eecccd510041624877e3ff9efb900abc222 (diff)
downloadjokevote-cf94177eb06be4d7b9c2d677dea58ab3f0d7133e.tar.gz
jokevote-cf94177eb06be4d7b9c2d677dea58ab3f0d7133e.zip
prevent users from voting multiple times
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/index.html b/templates/index.html
index c4e17b8..1a6edf3 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -19,13 +19,13 @@
<form action="/vote" method="post">
<input type="hidden" name="id" value="{{ joke.id }}">
<input type="hidden" name="redirpage" value="{{ currentpage }}">
- <button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="upvote"><i class="material-icons">thumb_up</i> {{ joke.upvotes }}</button>
- <button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="downvote"><i class="material-icons">thumb_down</i> {{ joke.downvotes }}</button>
+ <button class="btn{% if joke.reports>0 %}-flat{% endif %}{% if joke.locked %} disabled{% endif %} col s12" type="submit" name="vote" value="upvote"><i class="material-icons">thumb_up</i> {{ joke.upvotes }}</button>
+ <button class="btn{% if joke.reports>0 %}-flat{% endif %}{% if joke.locked %} disabled{% endif %} col s12" type="submit" name="vote" value="downvote"><i class="material-icons">thumb_down</i> {{ joke.downvotes }}</button>
</form>
<form action="/report" method="post">
<input type="hidden" name="id" value="{{ joke.id }}">
<input type="hidden" name="redirpage" value="{{ currentpage }}">
- <button class="btn-flat col s12" type="submit">
+ <button class="btn-flat{% if joke.locked %} disabled{% endif %} col s12" type="submit">
{% if joke.reports>0 %}
<div class="row">
<i class="material-icons col s6">report_problem</i>