{block name='boxes-box-login'}
    {et_isShopVersionAtLeast value="5.5.0-rc.1" assign='shopIsAtLeast55'}
    <div id="sidebox{$oBox->getID()}" class="box box-login box-normal">
        {block name='boxes-box-login-content'}
            {$customer = JTL\Session\Frontend::getCustomer()}
            {block name='boxes-box-login-title'}
                <div class="productlist-filter-headline">
                    {if $customer->getID() === 0}{lang key='login'}{else}{lang key='hello'}, {$customer->cVorname} {$customer->cNachname}{/if}
                </div>
            {/block}
            {if $customer->getID() === 0}
                {block name='boxes-box-login-form'}
                    <div class="box-content-wrapper">
                    <form action="{get_static_route id='jtl.php' secure=true}" method="post" class="form jtl-validate label-slide">
                        {csrf_token}
                        {block name="et-boxes-box-login-form-required-info"}
                            {if $shopIsAtLeast55}
                                <div class="required-info">{lang key='requiredInfo'}</div>
                            {/if}
                        {/block}
                        {block name='boxes-box-login-form-data'}
                            <input type="hidden" name="login" value="1" />
                            {include file='snippets/form_group_simple.tpl'
                                options=[
                                    'email', "email-box-login-{$oBox->getID()}", 'email', null,{lang key='emailadress'}, true, null, 'email', 'sm'
                                ]
                            }
                            {include file='snippets/form_group_simple.tpl'
                                options=[
                                    'password', "password-box-login-{$oBox->getID()}", 'passwort', null,
                                    {lang key='password' section='account data'}, true, null, 'current-password', 'sm'
                                ]
                            }
                        {/block}
                        {if isset($showLoginCaptcha) && $showLoginCaptcha}
                            {block name='boxes-box-login-form-captcha'}
                                {formgroup class="simple-captcha-wrapper"}
                                    {captchaMarkup getBody=true}
                                {/formgroup}
                            {/block}
                        {/if}
                        {block name='boxes-box-login-form-submit'}
                            {if !empty($oRedirect->cURL)}
                                {foreach $oRedirect->oParameter_arr as $oParameter}
                                    {input type="hidden" name=$oParameter->Name value=$oParameter->Wert}
                                {/foreach}
                                <input type="hidden" name="r" value="{$oRedirect->nRedirect}" />
                                <input type="hidden" name="cURL" value="{$oRedirect->cURL}" />
                            {/if}
                            {include file="widgets/base/button.tpl" type="submit" name="speichern" value="1" variant="primary" classes="btn-block btn-sm submit" label="{lang key='login' section='checkout'}"}
                        {/block}
                        {block name='boxes-box-login-form-links'}
                            <a class="resetpw box-login-resetpw" href="{get_static_route id='pass.php' secure=true}">
                                {lang key='forgotPassword'}
                            </a>
                            {lang key='newHere'}
                            <a class="register text-decoration-underline" href="{get_static_route id='registrieren.php'}">
                                {lang key='registerNow'}
                            </a>
                        {/block}
                    </form>
                    </div>
                {/block}
            {else}
                {block name='boxes-box-login-actions'}
                    <div class="box-content-wrapper">
                        {include file="widgets/base/button.tpl" variant="primary" classes="btn-block btn-sm btn-account" href="{get_static_route id='jtl.php'}" title="{lang key='myAccount'}" label="{lang key='myAccount'}"}
                        {include file="widgets/base/button.tpl" variant="primary" classes="btn-block btn-sm btn-logout" href="{get_static_route id='jtl.php'}?logout=1&token={$smarty.session.jtl_token}" title="{lang key='logOut'}" label="{lang key='logOut'}"}
                    </div>
                {/block}
            {/if}
            {block name='boxes-box-login-hr-end'}
                <hr class="box-normal-hr">
            {/block}
        {/block}
    </div>
{/block}
