{block name='register-form-customer-account'}
    {block name='register-form-customer-account-include-inc-billing-address-form'}
        {include file='checkout/inc_billing_address_form.tpl'}
    {/block}
    {block name='register-form-customer-account-content'}
        <div class="et-boxed-content">
        {if !$editRechnungsadresse}
            <div class="row register-form-account">
                {block name='register-form-customer-account-unreg'}
                    <div class="col col-12 col-md-6">
                        {if !JTL\Session\Frontend::getCart()->hasDigitalProducts() && isset($checkout)
                            && $Einstellungen.kaufabwicklung.bestellvorgang_unregistriert === 'Y'}
                            <div class="form-group checkbox register-form-account-unreg control-toggle">
                                <input type="hidden" name="unreg_form" value="1" />
                                <div class="custom-control custom-checkbox custom-control-inline">
                                    <input class="custom-control-input"
                                        type="checkbox" id="checkout_create_account_unreg"
                                        value="0"
                                        name="unreg_form"
                                        {if $unregForm !== 1 && !empty($fehlendeAngaben)}checked{/if}
                                        data-toggle="collapse"
                                        data-target="#create_account_data"
                                    >
                                    <label for="checkout_create_account_unreg" class="custom-control-label">
                                        {lang key='createNewAccount' section='account data'}
                                    </label>
                                </div>
                            </div>
                        {else}
                            <input type="hidden" name="unreg_form" value="0" />
                        {/if}
                    </div>
                {/block}
                {block name='register-form-customer-account-password'}
                    <div class="col col-12">
                        <div id="create_account_data" class="form-row collapse collapse-non-validate {if empty($checkout)
                        || JTL\Session\Frontend::getCart()->hasDigitalProducts()
                        || $Einstellungen.kaufabwicklung.bestellvorgang_unregistriert === 'N'
                        || ($unregForm !== 1 && !empty($fehlendeAngaben))}show{else}hidden{/if}" aria-expanded="true"
                        >
                            {block name='register-form-customer-account-password-first'}
                                <div class="col col-12 col-md-6">
                                    <div class="form-group register-form-account-password d-flex flex-column {if isset($fehlendeAngaben.pass_zu_kurz) || isset($fehlendeAngaben.pass_ungleich) || isset($fehlendeAngaben.pass_zu_lang)} has-error{/if}" role="group">
                                        <input type="password"
                                            placeholder=" "
                                            id="password"
                                            class="form-control"
                                            required
                                            value=""
                                            name="pass"
                                            aria-autocomplete="none"
                                            autocomplete="new-password"
                                            maxlength="255"
                                            {if ($unregForm === 1)}disabled{/if}
                                            aria-invalid="{if isset($fehlendeAngaben.pass_zu_kurz) || isset($fehlendeAngaben.pass_zu_lang)}true{else}false{/if}"
                                        />
                                        <label for="password" class="col-form-label">
                                            {lang key='password' section='account data'}
                                        </label>
                                        {if isset($fehlendeAngaben.pass_zu_kurz)}
                                            <div class="form-error-msg" aria-live="assertive" role="alert" aria-atomic="true"><i class="{et_getIcon key="missingInput"}"></i>
                                                {lang key='passwordTooShort' section='login' printf=$Einstellungen.kunden.kundenregistrierung_passwortlaenge}
                                            </div>
                                        {elseif isset($fehlendeAngaben.pass_zu_lang)}
                                            <div class="form-error-msg" aria-live="assertive" role="alert" aria-atomic="true"><i class="{et_getIcon key="missingInput"}"></i>
                                                {lang key='passwordTooLong' section='login'}
                                            </div>
                                        {/if}
                                    </div>
                                    {block name='account-change-password-include-password-check'}
                                        {include file='snippets/password_check.tpl' id='#password' loadScript=true}
                                    {/block}
                                </div>
                            {/block}
                            {block name='register-form-customer-account-password-repeat'}
                                <div class="col col-12 col-md-6">
                                    {formgroup
                                        class="register-form-account-password-repeat {if isset($fehlendeAngaben.pass_zu_kurz) || isset($fehlendeAngaben.pass_ungleich) || isset($fehlendeAngaben.pass_zu_lang)} has-error{/if}"
                                        label="{lang key='passwordRepeat' section='account data'}"
                                        label-for="password2"
                                    }
                                        {if isset($fehlendeAngaben.pass_ungleich)}
                                            <div class="form-error-msg" aria-live="assertive" role="alert" aria-atomic="true"><i class="{et_getIcon key="missingInput"}"></i>
                                                {lang key='passwordsMustBeEqual' section='account data'}
                                            </div>
                                        {/if}
                                        <input
                                            type="password"
                                            name="pass2"
                                            id="password2"
                                            class="form-control"
                                            placeholder=" "
                                            required
                                            data-must-equal-to="#create_account_data input[name='pass']"
                                            data-custom-message="{lang key='passwordsMustBeEqual' section='account data'}"
                                            autocomplete="new-password"
                                            aria-autocomplete="none"
                                            maxlength="255"
                                            {if ($unregForm === 1)}disabled{/if}
                                            value=""
                                            aria-invalid="{if isset($fehlendeAngaben.pass_ungleich)}true{else}false{/if}"
                                        />
                                    {/formgroup}
                                </div>
                            {/block}
                        </div>
                    </div>
                {/block}
            </div>
        {/if}
        </div>

    {/block}
{/block}
