master
Aevann1 2022-02-07 14:26:11 +02:00
parent e240ce550e
commit be13ba1810
6 changed files with 27 additions and 9 deletions

View File

@ -385,7 +385,7 @@ class Comment(Base):
body += f'<input class="d-none" id="current-{self.id}" value={curr[0].comment_id}>' body += f'<input class="d-none" id="current-{self.id}" value={curr[0].comment_id}>'
for c in self.choices: for c in self.choices:
body += f'''<div class="custom-control mt-3"><input name="choice" 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" autocomplete="off" class="custom-control-input" type="radio" id="{c.id}" onchange="choice_vote('{c.id}','{self.id}')"'''
if c.poll_voted(v): body += " checked " if c.poll_voted(v): body += " checked "
body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}''' body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}'''
if not self.total_choice_voted(v): body += ' d-none' if not self.total_choice_voted(v): body += ' d-none'

View File

@ -398,7 +398,7 @@ class Submission(Base):
body += f'<input class="d-none" id="current-{self.id}" value={curr[0].comment_id}>' body += f'<input class="d-none" id="current-{self.id}" value={curr[0].comment_id}>'
for c in self.choices: for c in self.choices:
body += f'''<div class="custom-control mt-3"><input name="choice" 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" autocomplete="off" class="custom-control-input" type="radio" id="{c.id}" onchange="choice_vote('{c.id}','{self.id}')"'''
if c.poll_voted(v): body += " checked " if c.poll_voted(v): body += " checked "
body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}''' body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}'''
if not self.total_choice_voted(v): body += ' d-none' if not self.total_choice_voted(v): body += ' d-none'

View File

@ -909,7 +909,7 @@
</style> </style>
{% if v %} {% if v %}
<script src="/static/assets/js/marked.js?a=240"></script> <script src="/static/assets/js/marked.js?a=241"></script>
<script src="/static/assets/js/comments_v.js?a=243"></script> <script src="/static/assets/js/comments_v.js?a=243"></script>
{% endif %} {% endif %}

View File

@ -87,13 +87,31 @@ You can use Markdown formatting:
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td> <td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
</tr> </tr>
<tr> <tr>
<td>Poll Options</td> <td>Poll Options (can select multiple options)</td>
<td>$$bussy$$</td> <td>$$bussy$$ $$gussy$$</td>
<td> <td>
<div class="custom-control"> <div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422741" name="option"> <input autocomplete="off" type="checkbox" class="custom-control-input" id="422741">
<label class="custom-control-label" for="422741">bussy - <a href="/votes?link=t3_422741"><span id="poll-422741">0</span> votes</a></label> <label class="custom-control-label" for="422741">bussy - <a href="/votes?link=t3_422741"><span id="poll-422741">0</span> votes</a></label>
</div> </div>
<div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422742">
<label class="custom-control-label" for="422742">gussy - <a href="/votes?link=t3_422742"><span id="poll-422742">0</span> votes</a></label>
</div>
</td>
</tr>
<tr>
<td>Poll Options (can select only 1 option)</td>
<td>##bussy## ##gussy##</td>
<td>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338113">
<label class="custom-control-label" for="1338113">bussy - <a href="/votes?link=t3_1338113"><span id="choice-1338113">0</span> votes</a></label>
</div>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338114">
<label class="custom-control-label" for="1338114">gussy - <a href="/votes?link=t3_1338114"><span id="choice-1338114">0</span> votes</a></label>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -256,7 +256,7 @@
checkForRequired() checkForRequired()
</script> </script>
<script src="/static/assets/js/marked.js?a=240"></script> <script src="/static/assets/js/marked.js?a=241"></script>
<script src="/static/assets/js/formatting.js?a=240"></script> <script src="/static/assets/js/formatting.js?a=240"></script>
<script src="/static/assets/js/submit.js?a=243"></script> <script src="/static/assets/js/submit.js?a=243"></script>
{% include "emoji_modal.html" %} {% include "emoji_modal.html" %}

View File

@ -730,7 +730,7 @@
</nav> </nav>
{% endif %} {% endif %}
<script src="/static/assets/js/marked.js?a=240"></script> <script src="/static/assets/js/marked.js?a=241"></script>
<style> <style>
.userbanner { .userbanner {