forked from rDrama/rDrama
1
0
Fork 0
master
kek7198 2021-12-10 14:16:58 -06:00
parent 0e5c30e5e1
commit e90f3eeda1
1 changed files with 13 additions and 1 deletions

View File

@ -8,6 +8,18 @@
</button>
</div>
<div class="modal-body">
<!-- If user has less than 100 dramacoin, disable form -->
{% if u.coins >= 100 %}
<div class="absolute left-0 bottom-0 flex flex-col items-center justify-center w-full h-full bg-white/60 z-10">
<p class="text-lg font-bold text-gray-900 mb-0">
You need at least 100 dramacoin to send coins.
</p>
<small class="mt-1 block text-gray-500">
Earn dramacoin by creating content and receiving votes.
</small>
</div>
{% endif %}
<!-- Form -->
<form class="profile-toggleable" id="message" action="/@{{u.username}}/message" method="post">
<div class="relative rounded-lg border border-gray-300 bg-gray-100 shadow-inner w-full">
<textarea maxlength="1000" id="gift-message" name="message" form="message" class="w-full rounded-t-md p-3 bg-transparent focus:bg-white shadow-inner resize-y focus:outline-none" aria-label="With textarea" placeholder="'tis the season of giving..." rows="3"></textarea>
@ -41,7 +53,7 @@
<button type="button" class="px-4 py-2 text-sm font-bold text-gray-500 hover:text-gray-700" data-bs-dismiss="modal">
Cancel
</button>
<button onclick="transferCoins()" class="btn btn-green">
<button onclick="transferCoins()" class="btn btn-green {{ 'pointer-events-none' if u.coins < 100 }}" {% if u.coins < 100 %}disabled{% endif %}>
Gift coins
</button>
</div>