{% extends 'manage/users/master.twig' %} {% from 'macros.twig' import pagination, container_title %} {% from 'user/macros.twig' import user_profile_warning %} {% from '_layout/input.twig' import input_text, input_csrf, input_select, input_hidden %} {% block manage_content %}
{{ container_title(' Filters') }} {{ input_text('lookup', null, warnings.username, 'text', 'Enter a username') }}
{% if warnings.user_id > 0 and warnings.username|length > 0 %}{# shittiest validation in the world, but it should work #}
{{ container_title(' Warn ' ~ warnings.username) }} {{ input_csrf('users_edit') }} {{ input_hidden('warning[user]', warnings.user_id) }} {{ input_select('warning[type]', warnings.types) }} {{ input_text('warning[note]', '', '', 'text', 'Public note') }} {{ input_text('warning[until]', '', ''|date('c'), 'datetime-local') }} (empty to set null)
{% endif %}
{{ container_title(' Warnings') }} {% set warnpag = pagination(warnings.count, warnings.take, warnings.offset, '/manage/users.php?v=warnings') %} {{ warnpag }}
User
User IP
Issuer
Issuer IP
Type
Created
Expires
Note
{% for warning in warnings.list %} {{ user_profile_warning(warning, true, true, true, true, csrf_token('warning-delete[%d]'|format(warning.warning_id))) }} {% endfor %}
{{ warnpag }}
{% endblock %}