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>
2022-02-01 02:20:25 +00:00
<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>
2022-02-01 02:20:25 +00:00
<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>
2022-01-23 19:51:56 +00:00
{% for badge in badge_types %}
2021-10-15 14:08:27 +00:00
<tr>
2021-12-20 14:28:38 +00:00
<td>
<div class="custom-control">
2022-02-03 06:39:02 +00:00
<input autocomplete="off" class="custom-control-input" type="radio" id="{{badge.id}}" name="badge_id" value="{{badge.id}}">
2022-01-23 19:51:56 +00:00
<label class="custom-control-label" for="{{badge.id}}"></label>
2021-12-20 14:28:38 +00:00
</div>
</td>
2022-02-25 13:26:56 +00:00
<td><label for="badge-{{badge.id}}"><img alt="{{badge.name}}" loading="lazy" src="/static/assets/images/badges/{{badge.id}}.webp?a=1013" width=64.16 height=70></label></td>
2022-01-23 19:51:56 +00:00
<td>{{badge.name}}</td>
<td>{{badge.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 %}