69 lines
2.4 KiB
Twig
69 lines
2.4 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{%- block title -%}
|
|
{{- 'register'|trans }} - {{ parent() -}}
|
|
{%- endblock -%}
|
|
|
|
{% block mainClass %}page-register{% endblock %}
|
|
|
|
{% block header_nav %}
|
|
{% endblock %}
|
|
|
|
{% block sidebar_top %}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>{{ 'register'|trans }}</h1>
|
|
<div id="content" class="section">
|
|
<div class="container">
|
|
{% if kbin_registrations_enabled() %}
|
|
{{ form_start(form) }}
|
|
{% for flash_error in app.flashes('verify_email_error') %}
|
|
<div class="alert alert__danger">{{ flash_error }}</div>
|
|
{% endfor %}
|
|
{{ form_row(form.username, {
|
|
label: 'username',
|
|
}) }}
|
|
{{ form_row(form.email, {
|
|
label: 'email'
|
|
}) }}
|
|
{{ form_row(form.plainPassword, {
|
|
label: 'password'
|
|
}) }}
|
|
{% if kbin_captcha_enabled() %}
|
|
{{ form_row(form.captcha, {
|
|
label: false
|
|
}) }}
|
|
{% endif %}
|
|
{{ form_row(form.agreeTerms, {
|
|
translation_domain: false,
|
|
label: 'agree_terms'|trans({
|
|
'%terms_link_start%' : '<a href="'~path('page_terms')~'">', '%terms_link_end%' : '</a>',
|
|
'%policy_link_start%' : '<a href="'~path('page_privacy_policy')~'">', '%policy_link_end%' : '</a>',
|
|
}),
|
|
attr: {
|
|
'aria-label': 'agree_terms'|trans
|
|
},
|
|
row_attr: {
|
|
class: 'checkbox'
|
|
}
|
|
}) }}
|
|
{{ form_row(form.submit, {
|
|
label: 'register',
|
|
attr: {
|
|
class: 'btn btn__primary'
|
|
},
|
|
row_attr: {
|
|
class: 'float-end'
|
|
}
|
|
}) }}
|
|
{{ form_end(form) }}
|
|
{% else %}
|
|
<h3 class="text-muted">{{ 'registration_disabled'|trans }}</h3>
|
|
{% endif %}
|
|
{{ component('user_form_actions', {showLogin: true, showPasswordReset: true, showResendEmail: true}) }}
|
|
{{ component('login_socials') }}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|