2022-09-13 13:14:49 +00:00
|
|
|
{% extends 'manage/users/master.twig' %}
|
|
|
|
{% from 'macros.twig' import container_title %}
|
|
|
|
{% from 'manage/macros.twig' import permissions_table %}
|
|
|
|
{% from '_layout/input.twig' import input_csrf, input_text, input_checkbox, input_file, input_select, input_colour, input_hidden %}
|
|
|
|
|
|
|
|
{% set site_link = url('user-profile', {'user': user_info.id}) %}
|
|
|
|
|
|
|
|
{% block manage_content %}
|
2023-08-02 22:12:47 +00:00
|
|
|
<div class="manage__user" style="--accent-colour: {{ user_info.colour }}">
|
2022-09-13 13:14:49 +00:00
|
|
|
{% if manage_notices|length > 0 %}
|
|
|
|
<div class="warning">
|
|
|
|
<div class="warning__content">
|
|
|
|
{% for notice in manage_notices %}
|
|
|
|
<p>{{ notice }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<form method="post" action="{{ url('manage-user', {'user': user_info.id}) }}" class="container manage__user__container">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ container_title('Editing ' ~ user_info.name ~ ' (' ~ user_info.id ~ ')') }}
|
2022-09-13 13:14:49 +00:00
|
|
|
{{ input_csrf() }}
|
|
|
|
|
|
|
|
<div class="manage__user__details">
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Username</div>
|
|
|
|
<div class="form__label__input">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_text(can_edit_user ? 'user[username]' : '', 'manage__user__input', user_info.name, 'text', '', true, {'maxlength':16}) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">E-mail address</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text(can_edit_user ? 'user[email]' : '', 'manage__user__input', user_info.emailAddress, 'text', '', true, {'maxlength':255}) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Title</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text(can_edit_user ? 'user[title]' : '', 'manage__user__input', user_info.title, 'text', '', false, {'maxlength':64}) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Joined</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text('', 'manage__user__input', user_info.createdTime|date('c')) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Last online</div>
|
|
|
|
<div class="form__label__input">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_text('', 'manage__user__input', user_info.lastActiveTime|default(0)|date('c')) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Register IP</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text('', 'manage__user__input', user_info.registerRemoteAddress) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Last IP</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text('', 'manage__user__input', user_info.lastRemoteAddress) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Country</div>
|
|
|
|
<div class="form__label__input">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_text(can_edit_user ? 'user[country]' : '', 'manage__user__input', user_info.countryCode, 'text', 'XX', true, {'maxlength':2,'minlength':2}) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
{% if can_edit_user %}
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">New Password</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text('password[new]', 'manage__user__input', '', 'password') }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Confirm Password</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
{{ input_text('password[confirm]', 'manage__user__input', '', 'password') }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="manage__user__details">
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Custom Colour</div>
|
|
|
|
<div class="form__label__input">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_checkbox('colour[enable]', '', not user_info.colour.shouldInherit, '', '', false, null, not can_edit_user) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_colour(can_edit_user ? 'colour[hex]' : '', '', user_info.colour) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="manage__user__details">
|
|
|
|
<div class="manage__tags manage__tags--fixed">
|
|
|
|
{% for role in manage_roles %}
|
|
|
|
<label class="manage__tag" style="--accent-colour: {{ role.colour }}">
|
|
|
|
<div class="manage__tag__background"></div>
|
|
|
|
<div class="manage__tag__content">
|
2023-07-27 23:26:05 +00:00
|
|
|
{{ input_checkbox('roles[]', '', role.id in manage_user_has_roles, 'manage__tag__checkbox', role.id, false, null, not can_edit_user) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
<div class="manage__tag__title">
|
|
|
|
{{ role.name }}
|
|
|
|
</div>
|
|
|
|
{{ input_checkbox('user[display_role]', '', role.id == user_info.displayRoleId, 'manage__tag__checkbox', role.id, true, null, not can_edit_user) }}
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if can_edit_user %}
|
|
|
|
<div class="manage__user__buttons">
|
|
|
|
<button class="input__button manage__user__button">Save</button>
|
|
|
|
<button class="input__button manage__user__button" type="reset">Reset</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="container manage__user__container">
|
|
|
|
{{ container_title('Moderator tools') }}
|
2023-07-25 14:40:31 +00:00
|
|
|
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="container__content">
|
|
|
|
<p>Links to various moderator tools to use on this user, provided you have access to them.</p>
|
|
|
|
</div>
|
2023-07-25 14:40:31 +00:00
|
|
|
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__user__buttons">
|
|
|
|
{% if can_manage_notes %}
|
|
|
|
<a href="{{ url('manage-users-notes', {'user': user_info.id}) }}" class="input__button manage__user__button"><i class="fas fa-sticky-note fa-fw"></i> Notes</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if can_manage_warnings %}
|
|
|
|
<a href="{{ url('manage-users-warnings', {'user': user_info.id}) }}" class="input__button manage__user__button"><i class="fas fa-exclamation-circle fa-fw"></i> Warnings</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if can_manage_bans %}
|
|
|
|
<a href="{{ url('manage-users-bans', {'user': user_info.id}) }}" class="input__button manage__user__button"><i class="fas fa-ban fa-fw"></i> Bans</a>
|
|
|
|
{% endif %}
|
2023-07-25 14:40:31 +00:00
|
|
|
</div>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
2023-07-25 14:40:31 +00:00
|
|
|
|
2023-08-02 22:12:47 +00:00
|
|
|
{% if can_send_test_mail %}
|
2022-09-13 13:14:49 +00:00
|
|
|
<form method="post" action="{{ url('manage-user', {'user': user_info.id}) }}" class="container manage__user__container">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ container_title('Send test e-mail to ' ~ user_info.name ~ ' (' ~ user_info.id ~ ')') }}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
|
|
|
<p style="font-size: 2em; line-height: 2em; text-align: center; font-weight: 700;">DO NOT ABUSE THIS SHIT</p>
|
|
|
|
|
|
|
|
{{ input_csrf() }}
|
|
|
|
{{ input_hidden('send_test_email', 'yes_send_it') }}
|
|
|
|
|
|
|
|
<div class="manage__user__buttons">
|
|
|
|
<button class="input__button manage__user__button">Send</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2023-07-28 21:20:19 +00:00
|
|
|
{% endif %}
|
2023-05-21 18:15:04 +00:00
|
|
|
|
2023-07-28 21:20:19 +00:00
|
|
|
{% if can_impersonate %}
|
2023-05-21 18:15:04 +00:00
|
|
|
<form method="post" action="{{ url('manage-user', {'user': user_info.id}) }}" class="container manage__user__container">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ container_title('Impersonate ' ~ user_info.name ~ ' (' ~ user_info.id ~ ')') }}
|
2023-05-21 18:15:04 +00:00
|
|
|
|
|
|
|
<div class="container__content">
|
|
|
|
<p>Uses a special token to completely impersonate this user for testing.</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ input_csrf() }}
|
|
|
|
{{ input_hidden('impersonate_user', 'meow') }}
|
|
|
|
|
|
|
|
<div class="manage__user__buttons">
|
|
|
|
<button class="input__button manage__user__button">Impersonate</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2022-09-13 13:14:49 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2023-08-30 22:37:21 +00:00
|
|
|
{% if perms_lists is defined and perms_infos is defined %}
|
2023-07-25 14:52:51 +00:00
|
|
|
<form method="post" action="{{ url('manage-user', {'user': user_info.id}) }}" class="container manage__user__container">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ container_title('Permissions for ' ~ user_info.name ~ ' (' ~ user_info.id ~ ')') }}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-08-30 22:37:21 +00:00
|
|
|
{{ permissions_table(perms_lists, perms_infos, not can_edit_perms) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-07-25 14:52:51 +00:00
|
|
|
{% if can_edit_perms %}
|
|
|
|
{{ input_csrf() }}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-07-25 14:52:51 +00:00
|
|
|
<div class="manage__user__buttons">
|
|
|
|
<button class="input__button manage__user__button">Save</button>
|
|
|
|
<button class="input__button manage__user__button" type="reset">Reset</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|