leilukin-tumbleblog/admin/pages/new_user.twig

76 lines
2.1 KiB
Twig

{% extends "layouts" ~ DIR ~ "default.twig" %}
{% block title %}{{ "Add User" | translate }}{% endblock %}
{% block content %}
<h2>{{ "New User" | translate }}</h2>
<form id="new_user" class="split" action="{{ url('add_user') }}" method="post" accept-charset="UTF-8">
<fieldset role="presentation">
<p>
<label for="login">{{ "Login" | translate }}</label>
{#- -#}
<input class="text" type="text" name="login" value="" id="login" maxlength="64" required>
</p>
<p>
<label for="email">{{ "Email" | translate }}</label>
{#- -#}
<input class="text" type="email" name="email" value="" id="email" maxlength="128" required>
</p>
<p>
<label for="group">{{ "Group" | translate }}</label>
{#- -#}
<select name="group" id="group">
<option value="{{ default_group.id }}">
{{ default_group.name }}
</option>
{% for group in groups %}
<option value="{{ group.id }}">
{{ group.name }}
</option>
{% endfor %}
</select>
</p>
<p>
<label for="password1">{{ "Password" | translate }}</label>
{#- -#}
<input class="text" type="password" name="password1" value="" id="password1" maxlength="128" required>
</p>
<p>
<label for="password2">{{ "Confirm" | translate }}</label>
{#- -#}
<input class="text" type="password" name="password2" value="" id="password2" maxlength="128" required>
</p>
<p>
<label for="full_name">
{{ "Full Name" | translate }}
<span class="sub">{{ "(optional)" | translate }}</span>
</label>
{#- -#}
<input class="text" type="text" name="full_name" value="" id="full_name" maxlength="250">
</p>
<p>
<label for="website">
{{ "Website" | translate }}
<span class="sub">{{ "(optional)" | translate }}</span>
</label>
{#- -#}
<input class="text" type="url" name="website" value="" id="website" maxlength="128">
</p>
{% if site.email_activation %}
<p>
<label for="activated">{{ "Activated?" | translate }}</label>
{#- -#}
<input class="checkbox" type="checkbox" name="activated" id="activated">
</p>
{% endif %}
{{ trigger.call("new_user_fields") }}
<p class="buttons">
<button type="submit" class="yay">
{{ "Add User" | translate }}
</button>
</p>
<input type="hidden" name="hash" value="{{ authenticate() }}" id="hash">
</fieldset>
</form>
{% endblock %}