forked from rDrama/rDrama
74 lines
3.7 KiB
HTML
74 lines
3.7 KiB
HTML
{% extends "submit_navbar.html" %}
|
|
{% block pagetitle %}Submit {{kind}}{% if kind == 'Sidebar' %} Images{% else %}s{% endif %}{% endblock %}
|
|
{% block pagetype %}message{% endblock %}
|
|
{% block content %}
|
|
<h2 class="mt-3 mt-md-5">Submit {{kind}} {% if kind == 'Sidebar' %}Image{% endif %}</h2>
|
|
<div class="settings-section rounded">
|
|
<div class="d-lg-flex">
|
|
<div class="body w-lg-100">
|
|
<form action="/submit/art" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
|
|
<input hidden name="formkey" value="{{v|formkey}}" class="notranslate" translate="no">
|
|
<input hidden name="kind" value="{{kind.lower()}}" class="notranslate" translate="no">
|
|
|
|
<div id="image-upload-block">
|
|
<div><label class="mt-3">Image</label></div>
|
|
|
|
<img loading="lazy" id="image-preview" class="d-none" style="max-width:50%;border:5px white solid">
|
|
<label class="btn btn-secondary m-0" for="file-upload">
|
|
<div>Select Image</div>
|
|
<input autocomplete="off" id="file-upload" accept="image/*" type="file" name="image" {% if g.is_tor %}disabled{% endif %} hidden>
|
|
</label>
|
|
</div>
|
|
|
|
<label class="mt-3" for="author">Author</label>
|
|
<input autocomplete="off" type="text" id="author" class="form-control" name="author" maxlength="30" pattern='[a-zA-Z0-9_\-]{1,30}|\?{3}' placeholder="Required" value="{{username}}" required>
|
|
|
|
<div class="footer mt-5">
|
|
<div class="d-flex">
|
|
<input id="submit-btn" disabled type="submit" class="btn btn-primary ml-auto" value="Submit {{kind}}">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mt-5 mx-1">Pending Approval</h2>
|
|
<div class="mt-5">
|
|
<div class="col px-0">
|
|
<div class="settings">
|
|
{% for entry in entries %}
|
|
<div id="{{entry.id}}-art" class="settings-section rounded">
|
|
<div class="d-lg-flex">
|
|
<div class="body w-lg-100">
|
|
<input hidden value="{{v|formkey}}" class="notranslate" translate="no">
|
|
|
|
<div><label class="mt-3">Image</label></div>
|
|
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/asset_submissions/art/{{entry.id}}.webp?s={{range(1, 10000000)|random}}" style="max-width:50%;border:5px white solid">
|
|
|
|
<div><label class="mt-3" for="{{entry.id}}-submitter">Submitter</label></div>
|
|
<input autocomplete="off" type="text" id="{{entry.id}}-submitter" class="form-control" maxlength="30" value="{{entry.submitter}}" readonly>
|
|
|
|
<label class="mt-3" for="{{entry.id}}-author">Author</label>
|
|
<input autocomplete="off" type="text" id="{{entry.id}}-author" class="form-control" maxlength="30" value="{{entry.author}}" pattern='[a-zA-Z0-9_\-]{1,30}|\?{3}' placeholder="Required" required {% if v.admin_level < PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}readonly{% endif %}>
|
|
</div>
|
|
</div>
|
|
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] or v.id == entry.submitter_id %}
|
|
<div class="d-flex my-4 mx-3">
|
|
<input autocomplete="off" type="text" id="{{entry.id}}-comment" class="form-control mr-4" placeholder="Comment..." maxlength="500" {% if v.admin_level < PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}hidden{% endif %}>
|
|
|
|
<button type="button" class="btn btn-danger ml-auto" data-nonce="{{g.nonce}}" data-onclick="remove_art(this, '{{entry.id}}')">Remove</button>
|
|
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}
|
|
<button type="button" class="btn btn-success ml-3 mr-1" data-nonce="{{g.nonce}}" data-onclick="approve_art(this, '{{entry.id}}')">Approve</button>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script defer src="{{'js/submit_art.js' | asset}}"></script>
|
|
{% endblock %}
|