<div id="sylius-api-login">
    {{ form_errors(form.email, sylius_test_form_attribute('login-errors')) }}
    {% set ajax_user_check_action_path = path('sylius_shop_ajax_user_check_action')  %}
    {{ form_row(form.email, sylius_test_form_attribute('login-email')|sylius_merge_recursive({'attr': {'data-url': ajax_user_check_action_path}})) }}

    <div class="input-group" id="sylius-api-login-form">
        <input type="password" class="form-control" placeholder="{{ 'sylius.ui.password'|trans }}" {{ sylius_test_html_attribute('password-input') }}>
        <input type="hidden" name="_csrf_shop_security_token" value="{{ csrf_token('shop_authenticate') }}">

        <div class="input-group-append">
            <button class="btn btn-secondary" id="sylius-api-login-submit" {{ sylius_test_html_attribute('login-button') }} data-url="{{ path('sylius_shop_login_check') }}">
                {{ 'sylius.ui.sign_in'|trans }}
            </button>
        </div>
    </div>
    <div
        class="alert alert-danger d-none sylius-validation-error"
        id="sylius-api-validation-error"
        {{ sylius_test_html_attribute('login-validation-error') }}>
    </div>
</div>
