MarseyWorld/files/templates/modals/award.html

72 lines
3.4 KiB
HTML

<script defer src="{{'js/award_modal.js' | asset}}"></script>
<div class="modal fade" id="awardModal" tabindex="-1">
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered awardmodal pt-5">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Give Award</h5>
<button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span>
</button>
</div>
<div id="awardModalBody" class="modal-body pt-2 mb-3" style="overflow-x: hidden">
<div id="award-tabs" class="row pt-1 pb-4" style="justify-content: center">
<button id="effect-content-tab" class="btn btn-primary btn-block m-0 shop-tab award-tab active" data-nonce="{{g.nonce}}" data-onclick="switchAwardTab()">
<span class="mr-auto ml-auto"><i class="fas fa-gift mr-2"></i>EFFECT ON CONTENT</span>
</button>
<button id="effect-author-tab" class="btn btn-primary btn-block m-0 shop-tab award-tab" data-nonce="{{g.nonce}}" data-onclick="switchAwardTab()">
<span class="mr-auto ml-auto"><i class="fas fa-gift mr-2"></i>EFFECT ON AUTHOR</span>
</button>
</div>
<div class="awards-wrapper" style="text-align:center">
{% macro iterate_awards(awards) %}
{% for award in awards %}
{% set price = (award.price*v.award_discount)|int %}
<div data-bs-toggle="tooltip" data-bs-placement="bottom" title="Price: {{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-positive="{{award.positive}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})">
<i class="{{award.icon}} {{award.color}}"></i>
<div class="pt-1 award-name">{{award.title}}</div>
<div class="text-muted award-owned"><span id="{{award.kind}}-owned">{{award.owned}}</span> owned</div>
</div>
{% endfor %}
{% endmacro %}
<div id="effect-content-section" class="award-section">
{{iterate_awards(v.awards_content_effect)}}
</div>
<div id="effect-author-section" class="award-section d-none">
{{iterate_awards(v.awards_author_effect)}}
</div>
</div>
<input autocomplete="off" id="kind" hidden>
<div id="phrase_section" class="d-none">
<label for="note" class="pt-4">The phrase the recipient will have to say:</label>
<div class="input-group">
<select autocomplete="off" id='chud_phrase' class="form-control">
{% for entry in CHUD_PHRASES %}
<option value="{{entry}}">
{{entry}}
</option>
{% endfor %}
</select>
</div>
</div>
<div id="note_section">
<label id="notelabel" for="note" class="pt-4">Note (optional):</label>
<textarea autocomplete="off" id="note" maxlength="200" class="form-control" placeholder="Note to include in award notification..."></textarea>
</div>
<input autocomplete="off" id="giveaward" class="awardbtn btn btn-primary mt-3 fl-r" type="submit" data-nonce="{{g.nonce}}" data-onclick="giveaward(this)" value="Give Award" data-bs-dismiss="modal" disabled>
<button type="button" id="buy" class="awardbtn btn btn-primary mt-3 mr-3 fl-r" disabled data-areyousure="buy()" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Buy</button>
<div id="award_price_block" class="fl-r mt-4 mr-3 d-none text-small-sm">
Price: <span id="award_price"></span> coins/marseybux
</div>
</div>
</div>
</div>
</div>