{% extends '@SyliusShop/layout.html.twig' %}

{% form_theme form '@SyliusShop/Form/theme.html.twig' %}

{% block content %}
    <div class="register-container container">
        {% include '@SyliusShop/Register/_header.html.twig' %}

        {{ sylius_template_event('sylius.shop.register.after_content_header') }}

        <div class="form-block login-wrapper">
            {{ sylius_template_event('sylius.shop.register.before_form') }}

            {{ form_start(form, {'action': path('sylius_shop_register', {redirect: app.request.get('referer')|default('/')}), 'attr': {'class': 'loadable', 'novalidate': 'novalidate'}}) }}
            {% include '@SyliusShop/Register/_form.html.twig' %}

            {{ sylius_template_event('sylius.shop.register.form', {'form': form}) }}

            <button type="submit" class="btn btn-primary btn-block" {{ sylius_test_html_attribute('register-button') }}>
                {{ 'sylius.ui.create_an_account'|trans }} ›
            </button>

            {{ form_row(form._token) }}
            {{ form_end(form, {'render_rest': false}) }}
        </div>
    </div>
{% endblock %}
