forked from rDrama/rDrama
add "are you sure?" to "declare winner"
parent
6eea792b00
commit
d80a2f2331
|
@ -6273,4 +6273,10 @@ div.markdown {
|
|||
from { color: var(--gray-200) }
|
||||
50% { color:red }
|
||||
to { color: var(--gray-200) }
|
||||
}
|
||||
|
||||
.distribute {
|
||||
font-size:10px;
|
||||
padding: 2px 0.5rem !important;
|
||||
margin: 0 0.5rem !important;
|
||||
}
|
|
@ -362,7 +362,7 @@ class Submission(Base):
|
|||
|
||||
for o in self.options:
|
||||
if o.exclusive > 1:
|
||||
body += f'''<div class="custom-control"><input name="option-{self.id}" autocomplete="off" class="custom-control-input bet" type="radio" id="{o.id}" onchange="bet_vote('{o.id}','{self.id}')"'''
|
||||
body += f'''<div class="custom-control mt-2"><input name="option-{self.id}" autocomplete="off" class="custom-control-input bet" type="radio" id="{o.id}" onchange="bet_vote('{o.id}','{self.id}')"'''
|
||||
if o.voted(v): body += " checked "
|
||||
if not (v and v.coins >= 200) or self.total_bet_voted(v): body += " disabled "
|
||||
|
||||
|
@ -376,11 +376,11 @@ class Submission(Base):
|
|||
body += " - <b>WINNER!</b>"
|
||||
|
||||
if not winner and v and v.admin_level > 2:
|
||||
body += f'''<button class="btn btn-primary px-2 mx-2" style="font-size:10px;padding:2px" onclick="post_toast(this,'/distribute/{o.id}')">Declare winner</button>'''
|
||||
body += f'''<button class="btn btn-primary distribute" onclick="this.nextElementSibling.classList.remove('d-none');this.classList.add('d-none')">Declare winner</button><button class="btn btn-primary distribute d-none" onclick="post_toast(this,'/distribute/{o.id}')">Are you sure?</button>'''
|
||||
body += "</div>"
|
||||
else:
|
||||
input_type = 'radio' if o.exclusive else 'checkbox'
|
||||
body += f'<div class="custom-control"><input type="{input_type}" class="custom-control-input" id="post-{o.id}" name="option-{self.id}"'
|
||||
body += f'<div class="custom-control mt-2"><input type="{input_type}" class="custom-control-input" id="post-{o.id}" name="option-{self.id}"'
|
||||
if o.voted(v): body += " checked"
|
||||
|
||||
if v:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{%-
|
||||
set CACHE_VER = {
|
||||
'css/main.css': 4035,
|
||||
'css/main.css': 4036,
|
||||
'css/catalog.css': 4007,
|
||||
'css/4chan.css': 4007,
|
||||
'css/classic.css': 4031,
|
||||
|
|
Loading…
Reference in New Issue