<div id="rescission-select-order-form" >
    {$message}
    {include file="xtCore/pages/content.html"}

    {form type=form id=rescission_select_order_form name=rescission_select_order_form action='customer/rescission_confirmation' method=post conn=SSL}
    {form type=hidden name=page_action value=rescission_confirmation}
    <fieldset>

        <div class="row">
            <div class="form-group">
                <div class="col-xs-6">
                    <label for="firstname">{txt key=TEXT_FIRSTNAME}*</label>
                    <input id="firstname" type="text" name="firstname" class="form-control" required value="{$firstname}">
                </div>
                <div class="col-xs-6">
                    <label for="lastname">{txt key=TEXT_LASTNAME}*</label>
                    <input id="lastname" type="text" name="lastname" class="form-control" required value="{$lastname}">
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="email">{txt key=text_email}*</label>
            <input id="email" type="email" name="email" maxlength="96" autocomplete="email" required value="{$email}"
                   {if $smarty.session.registered_customer && false}disabled="disabled"{/if}
            />
        </div>

        <div class="form-group">
            <label for="order_id">{txt key=TEXT_ORDER_NUMBER}*</label>
            <input id="order_id" type="text" name="order" required value="{$order_id}"/>
        </div>

        <p>
            {txt key="TEXT_HEREBY_I_REVOKE_1"}
        </p>

        <div class="form-group">
            <label for="customer_comments">{txt key=TEXT_MESSAGE} <!--span class="small">({txt key=TEXT_OPTIONAL})</span--></label>
            <textarea name="customer_comments" id="customer_comments" class="form-control autosizejs" cols="50" rows="10" placeholder="" maxlength="2048"></textarea>
            <br />
        </div>

        {if !$smarty.session.registered_customer}
            {if $smarty.const._STORE_CAPTCHA == 'ReCaptcha'}

                <div class="recaptcha-wrapper"></div>

            {elseif $smarty.const._STORE_CAPTCHA == 'Standard'}
                <p id="captcha-img" class="right">
                    <img id="captchaImg" src="" alt="{txt key=TEXT_CAPTCHA}"/>
                </p>
                <label for="captcha_code">{txt key=TEXT_CAPTCHA}*</label>
                {form id=captcha_code type=text name=captcha params='maxlength="30"'}
                <script>

                    document.addEventListener('DOMContentLoaded', function () {
                        const captchaImg = document.getElementById('captchaImg');
                        console.log(captchaImg);
                        if(captchaImg)
                        {
                            setTimeout(function(captchaImg){ captchaImg.src = '{$captcha_link}'; }, 500, captchaImg);
                        }
                    });

                </script>
            {/if}
        {/if}
        <br />

        <!--button type="submit" class="btn btn-success pull-right success">
            <i class="glyphicon glyphicon-ok"></i>
            &nbsp;&nbsp;{txt key=BUTTON_NEXT}
        </button -->
        <p>
            {$legal_text}
        </p>

        <button type="submit" class="btn btn-success pull-right success">
            <i class="glyphicon glyphicon-ok"></i>
            &nbsp;&nbsp;{txt key=TEXT_CANCEL_ORDER_NOW}
        </button -->

    </fieldset>
    {form type=formend}



</div><!-- #account-history-info -->
