rDrama/files/templates/admin/badge_grant.html

90 lines
2.6 KiB
HTML
Raw Normal View History

2021-10-15 14:08:27 +00:00
{% extends "default.html" %}
{% block title %}
<title>Badge Grant</title>
{% endblock %}
{% block pagetype %}message{% endblock %}
{% block content %}
{% if error %}
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
<i class="fas fa-exclamation-circle my-auto"></i>
<span>
{{error}}
</span>
2021-12-30 05:27:22 +00:00
<button role="button" class="close" data-bs-dismiss="alert" aria-label="Close">
2021-10-15 14:08:27 +00:00
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
{% endif %}
{% if msg %}
<div class="alert alert-success alert-dismissible fade show my-3" role="alert">
<i class="fas fa-check-circle my-auto" aria-hidden="true"></i>
<span>
{{msg}}
</span>
2021-12-30 05:27:22 +00:00
<button role="button" class="close" data-bs-dismiss="alert" aria-label="Close">
2021-10-15 14:08:27 +00:00
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
{% endif %}
<pre></pre>
<pre></pre>
<h5>Badge Grant</h5>
<form action="/admin/badge_grant", method="post">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
2021-10-15 14:08:27 +00:00
<label for="input-username">Username</label><br>
2021-12-28 12:41:26 +00:00
<input autocomplete="off" id="input-username" class="form-control" type="text" name="username" required>
2021-10-15 14:08:27 +00:00
2021-12-31 16:51:53 +00:00
<div class="overflow-x-auto"><table class="table table-striped">
2021-10-15 14:08:27 +00:00
<thead class="bg-primary text-white">
<tr>
<th scope="col">Select</th>
<th scope="col">Image</th>
<th scope="col">Name</th>
<th scope="col">Default Description</th>
</tr>
</thead>
<tbody>
2021-11-21 17:40:47 +00:00
{% for k, v in badge_types.items() %}
2021-10-15 14:08:27 +00:00
<tr>
2021-12-20 14:28:38 +00:00
<td>
<div class="custom-control">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" checked="" class="custom-control-input" type="radio" id="{{k}}" name="badge_id" value="{{k}}">
2021-12-20 14:28:38 +00:00
<label class="custom-control-label" for="{{k}}"></label>
</div>
</td>
2022-01-13 01:28:02 +00:00
<td><label for="badge-{{k}}"><img alt="{{v['name']}}" loading="lazy" src="/static/assets/images/badges/{{v['name']}}.webp?a=4" width="70px" height="70px"></label></td>
2021-11-21 17:40:47 +00:00
<td>{{v['name']}}</td>
<td>{{v['description']}}</td>
2021-10-15 14:08:27 +00:00
</tr>
{% endfor %}
</table>
<label for="input-url">URL</label><br>
2021-12-28 12:41:26 +00:00
<input autocomplete="off" id="input-url" class="form-control" type="text" name="url" placeholder="Optional">
2021-10-15 14:08:27 +00:00
<label for="input-description">Custom description</label><br>
2021-12-28 12:41:26 +00:00
<input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Leave blank for badge default">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="btn btn-primary" type="submit">
2021-10-15 14:08:27 +00:00
</form>
2021-10-29 17:18:12 +00:00
<style>
2021-11-03 14:18:21 +00:00
@media (max-width: 767.98px) {
table {
display: inline-block;
overflow: auto;
}
2021-10-29 17:18:12 +00:00
}
</style>
2021-10-15 14:08:27 +00:00
{% endblock %}