75 lines
2.1 KiB
HTML
75 lines
2.1 KiB
HTML
{% 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>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<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>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<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">
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
|
|
|
|
<label for="input-username">Username</label><br>
|
|
<input id="input-username" class="form-control" type="text" name="username" required>
|
|
|
|
<table class="table table-striped">
|
|
<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>
|
|
{% for badge in badge_types %}
|
|
<tr>
|
|
<td><input type="radio" id="badge-{{badge.id}}" name="badge_id" value="{{badge.id}}"></td>
|
|
<td><label for="badge-{{badge.id}}"><img loading="lazy" class="d-block" src="{{badge.path}}" width="70px" height="70px"></label></td>
|
|
<td>{{badge.name}}</td>
|
|
<td>{{badge.description}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<label for="input-url">URL</label><br>
|
|
<input id="input-url" class="form-control" type="text" name="url" placeholder="Optional">
|
|
|
|
<label for="input-description">Custom description</label><br>
|
|
<input id="input-description" class="form-control" type="text" name="description" placeholder="Leave blank for badge default">
|
|
|
|
<input class="btn btn-primary" type="submit">
|
|
|
|
</form>
|
|
{% endblock %}
|