{*
* _             _       _
* | |____      _| | __ _| |__
* | '_ \ \ /\ / / |/ _` | '_ \
* | |_) \ V  V /| | (_| | |_) |
* |_.__/ \_/\_/ |_|\__,_|_.__/.
*
* @author    Bwlab di Luigi Massa <info@bwlab.it>
* @copyright since 2014 Bwlab
* @license   proprietary
*}
{**
 * Inline withdrawal form (included by withdrawal-button.tpl)
 *}
<form class="bwwithdrawal-form__inner" novalidate>
    <input type="hidden" name="id_order" value="{$id_order|intval}">
    <input type="hidden" name="token" value="{$token|escape:'html':'UTF-8'}">

    <div class="form-group">
        <label for="bwwithdrawal-name-{$id_order|intval}">
            {l s='Full name' mod='bwwithdrawal'}
        </label>
        <input type="text"
               id="bwwithdrawal-name-{$id_order|intval}"
               name="customer_name"
               class="form-control"
               value="{$customer_name|escape:'html':'UTF-8'}"
               required>
    </div>

    <div class="form-group">
        <label for="bwwithdrawal-ref-{$id_order|intval}">
            {l s='Order reference' mod='bwwithdrawal'}
        </label>
        <input type="text"
               id="bwwithdrawal-ref-{$id_order|intval}"
               class="form-control"
               value="{$order_reference|escape:'html':'UTF-8'}"
               readonly>
    </div>

    <div class="form-group">
        <label for="bwwithdrawal-email-{$id_order|intval}">
            {l s='Confirmation email' mod='bwwithdrawal'}
        </label>
        <input type="email"
               id="bwwithdrawal-email-{$id_order|intval}"
               name="customer_email"
               class="form-control"
               value="{$customer_email|escape:'html':'UTF-8'}"
               required>
    </div>

    <div class="form-group">
        <label class="bwwithdrawal-checkbox">
            <input type="checkbox" name="declaration" required>
            {l s='I declare that I wish to exercise my right of withdrawal from this contract.' mod='bwwithdrawal'}
        </label>
    </div>

    <div class="bwwithdrawal-form__footer">
        <button type="submit" class="btn btn-primary bwwithdrawal-submit" disabled>
            {l s='Confirm withdrawal' mod='bwwithdrawal'}
        </button>
        <span class="bwwithdrawal-feedback" role="alert" aria-live="polite"></span>
    </div>
</form>
