sfd
parent
53702d5f13
commit
37bd922126
|
@ -392,10 +392,11 @@ class Comment(Base):
|
||||||
if not self.total_poll_voted(v): body += ' d-none'
|
if not self.total_poll_voted(v): body += ' d-none'
|
||||||
body += f'"> - <a href="/votes?link=t3_{c.id}"><span id="poll-{c.id}">{c.upvotes}</span> votes</a></span></label></div>'
|
body += f'"> - <a href="/votes?link=t3_{c.id}"><span id="poll-{c.id}">{c.upvotes}</span> votes</a></span></label></div>'
|
||||||
|
|
||||||
curr = self.total_choice_voted(v)
|
if self.choices:
|
||||||
if curr: curr = " value=" + str(curr[0].comment_id)
|
curr = self.total_choice_voted(v)
|
||||||
else: curr = ''
|
if curr: curr = " value=" + str(curr[0].comment_id)
|
||||||
body += f'<input class="d-none" id="current-{self.id}"{curr}>'
|
else: curr = ''
|
||||||
|
body += f'<input class="d-none" id="current-{self.id}"{curr}>'
|
||||||
|
|
||||||
for c in self.choices:
|
for c in self.choices:
|
||||||
body += f'''<div class="custom-control"><input name="choice-{self.id}" autocomplete="off" class="custom-control-input" type="radio" id="{c.id}" onchange="choice_vote('{c.id}','{self.id}')"'''
|
body += f'''<div class="custom-control"><input name="choice-{self.id}" autocomplete="off" class="custom-control-input" type="radio" id="{c.id}" onchange="choice_vote('{c.id}','{self.id}')"'''
|
||||||
|
|
Loading…
Reference in New Issue