mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-14 03:23:46 +01:00
99 lines
3.2 KiB
HTML
99 lines
3.2 KiB
HTML
{% extends "users/settings_base.html" %}
|
|
|
|
{% block title %}
|
|
{{ _("Moderator Tools") }}
|
|
{% endblock %}
|
|
|
|
{% block pane %}
|
|
<h2 class="mt-0">{{ _("Moderator Tools") }}</h2>
|
|
|
|
<h3>
|
|
{{ _("Edit Account") }}
|
|
</h3>
|
|
|
|
{% from "macros/forms.html" import render_field, render_field_prefix, render_submit_field %}
|
|
<form action="" method="POST" class="form" role="form">
|
|
{{ form.hidden_tag() }}
|
|
|
|
{% if user.check_perm(current_user, "CHANGE_USERNAMES") %}
|
|
{{ render_field(form.username, tabindex=230) }}
|
|
{{ render_field(form.display_name, tabindex=230) }}
|
|
{{ render_field(form.forums_username, tabindex=230) }}
|
|
{{ render_field_prefix(form.github_username, tabindex=230) }}
|
|
{% endif %}
|
|
|
|
{% if user.check_perm(current_user, "CHANGE_RANK") %}
|
|
{{ render_field(form.rank, tabindex=250) }}
|
|
{% endif %}
|
|
|
|
<p>
|
|
{{ render_submit_field(form.submit, tabindex=280) }}
|
|
</p>
|
|
</form>
|
|
|
|
|
|
<h3>{{ _("Password") }}</h3>
|
|
{% if user.password %}
|
|
<p>{{ _("Has password") }}</p>
|
|
{% else %}
|
|
<p class="text-danger">{{ _("Doesn't have password") }}</p>
|
|
{% endif %}
|
|
|
|
{% if not user.rank.at_least(current_user.rank) %}
|
|
<h3>{{ _("Ban") }}</h3>
|
|
{% if user.ban %}
|
|
<p>
|
|
Banned by {{ user.ban.banned_by.display_name }} at {{ user.ban.created_at | full_datetime }}
|
|
{% if user.ban.expires_at %}
|
|
until {{ user.ban.expires_at | date }}
|
|
{% endif %}
|
|
</p>
|
|
<blockquote>
|
|
{{ user.ban.message }}
|
|
</blockquote>
|
|
<form method="POST" action="{{ url_for('users.modtools_unban', username=user.username) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<input type="submit" value="{{ _('Unban') }}" class="btn btn-primary" />
|
|
</form>
|
|
{% else %}
|
|
<form method="POST" action="{{ url_for('users.modtools_ban', username=user.username) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<div class="form-group mb-3">
|
|
<label for="message" class="form-label">{{ _("Message") }}</label>
|
|
<span class="ms-1 text-danger">
|
|
<small>
|
|
<i class="fas fa-asterisk"></i>
|
|
</small>
|
|
</span>
|
|
<span class="ms-3 text-muted">
|
|
{{ _("Required") }}
|
|
</span>
|
|
<input id="message" class="form-control" type="text" name="message" required minlength="5">
|
|
<small class="form-text text-muted">
|
|
{{ _("Message to display to banned user") }}
|
|
</small>
|
|
</div>
|
|
<div class="form-group mb-3">
|
|
<label for="expires_at" class="form-label">{{ _("Expires At") }}</label>
|
|
<input id="expires_at" class="form-control" type="date" name="expires_at">
|
|
<small class="form-text text-muted">
|
|
{{ _("Expiry date. Leave blank for permanent ban") }}
|
|
</small>
|
|
</div>
|
|
<input type="submit" value="{{ _('Ban') }}" class="btn btn-danger" />
|
|
</form>
|
|
{% endif %}
|
|
|
|
<h3>{{ _("Change Email and Send Password Reset") }}</h3>
|
|
<form method="POST" action="{{ url_for('users.modtools_set_email', username=user.username) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<div class="form-group mb-3">
|
|
<label for="email" class="form-label">{{ _("Email Address") }}</label>
|
|
<input type="email" class="form-control" name="email" id="email" value="{{ user.email or '' }}" />
|
|
</div>
|
|
<input type="submit" value="{{ _('Save') }}" class="btn btn-primary" />
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|