{% extends "theme::layouts/default" %}

{% block styles %}
    {{ asset_style('visiosoft.theme.base::css/register.css') }}
{% endblock %}

{% block content %}
    <div class="py-4">
        <div class="row justify-content-center bg-light rounded border px-3">
            <div class="col-12 col-md-6 text-left p-3 m-0">

                {{ addBlock('register/register-type')|raw }}

                <div class="personal-register">
                    {% set form = form('register2').redirect(request_get('redirect', '/'))
                        .get() %}
                    {{ form_open({
                        'class': 'row form ' ~ form.options.class ,
                        'enctype': 'multipart/form-data',
                        'url':form.options.url
                    })|raw }}

                    {% include 'visiosoft.theme.base::addons/anomaly/users-module/partials/register-form' %}

                    <div class="col-12 row m-0">
                        <div class="col-6 pr-0 pl-1">
                            <button class="btn btn-sm btn-success py-2">
                                <i class="fas fa-user-plus"></i>
                                {{ trans('visiosoft.theme.base::button.register') }}
                            </button>
                        </div>
                    </div>
                    {{ form_close() }}
                </div>

                {{ addBlock('register/corporate-register')|raw }}
            </div>

            <div class="col-12 col-md-6 py-3 pr-0 instructions d-none d-md-block">
                {% set type = app.request.get('type') %}
                {% if type %}
                    {{ blocks(type) }}
                {% else %}
                    {{ blocks('register-instructions') }}
                {% endif %}

                {{ addBlock('register/instructions')|raw }}

                <div class="border small-notice py-3 px-4 mt-3">
                    <div class="d-flex text-muted">
                        <i class="fa fa-exclamation-circle" aria-hidden="true"></i>
                        <a href="{{ setting_value('visiosoft.theme.base::register_page_alert_link') }}" class="ml-2">
                            <small class="text-muted">
                                {{ trans('visiosoft.theme.base::field.register_information_note') }}
                            </small>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    {{ asset_add("scripts.js", "visiosoft.theme.base::js/register.js") }}
{% endblock %}

