{% extends is_mobile.check ? '@templates/Mobile/Shop/layout.html.twig' : '@templates/Front/Shop/layout.html.twig' %}
{% block title %} {{ 'app.ui.login'|trans }} | Roviniete.ro{% endblock %}
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
{% block content %}
{% include '@templates/Front/Shop/login_header.html.twig' %}
{{ sonata_block_render_event('sylius.shop.login.after_content_header') }}
<div class="row">
<div class="col-12 col-md-6 mb-3">
{{ sonata_block_render_event('sylius.shop.login.before_login') }}
<div class="card">
<div class="card-body">
<h4>{{ 'sylius.ui.registered_customers'|trans }}</h4>
<p>{{ 'sylius.ui.if_you_have_an_account_sign_in_with_your_email_address'|trans }}.</p>
{{ form_start(form, {'action': path('sylius_shop_login_check'), 'attr': {'class': 'loadable', 'novalidate': 'novalidate'}}) }}
{% include '@SyliusShop/Login/_form.html.twig' %}
{{ sonata_block_render_event('sylius.shop.login.form', {'form': form}) }}
<button type="submit" class="btn btn-primary">{{ 'sylius.ui.login'|trans }}</button>
<a href="{{ path('sylius_shop_request_password_reset_token') }}" class="btn btn-link">{{ 'sylius.ui.forgot_password'|trans }}</a>
<input type="hidden" name="_csrf_shop_security_token" value="{{ csrf_token('shop_authenticate') }}">
{{ form_end(form, {'render_rest': false}) }}
</div>
</div>
{{ sonata_block_render_event('sylius.shop.login.after_login') }}
</div>
<div class="col-12 col-md-6 mb-3">
{{ sonata_block_render_event('sylius.shop.login.before_register') }}
<div class="card">
<div class="card-body">
{% include '@SyliusShop/Login/_register.html.twig' %}
</div>
</div>
{{ sonata_block_render_event('sylius.shop.login.after_register') }}
</div>
</div>
<script>
$(document).ready(function () {
let username = $('#_username');
let label = $('label[for=' + username.attr('id') + ']');
label.html('{{ 'app.ui.email_address'|trans }}')
})
</script>
{% endblock %}