Jump to content

Why copied value passes and entered from the keyboard is not? (Rules basket)


maximP

Recommended Posts

if you enter from the keyboard 1234, it displays an error message if you copy the displayed value is the error does not occur.

{if $voucherAllowed}
                 {if isset($errors_discount) && $errors_discount}
                                <ul class="alert alert-danger">
                                    {foreach $errors_discount as $k=>$error}
                                        <li>{$error|escape:'html':'UTF-8'}</li>
                                        {/foreach}
                                </ul>
                            {/if}
                            <form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
                <div id='vouch'>
                  <input type='text' placeholder="{l s='1234'}" id='voucher_number' value="1234">
                  <input  onmouseover="$('#vouch').css('background', '#F49232');" onmouseout="$('#vouch').css('background', '#43B51F');" class="addVaucher" name="submitAddDiscount" type="submit" type="button" value="{l s='OK'}" >
                </div>

                                <fieldset style='display:none'>
                                    <input type="text"  class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
                                    <input type="hidden" name="submitDiscount" />

                                </fieldset>
                            </form>
                            {if $displayVouchers}
// displayed coupon code
                                <p id="title" class="title-offers">{l s='Take advantage of our exclusive offers:'}</p>
                                <div id="display_cart_vouchers">
                                    {foreach $displayVouchers as $voucher}
                                    the code-->    {if $voucher.code != ''}<span class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'}</span> - {/if}{$voucher.name}<br />
                                    {/foreach}
                                </div>
                            {/if}
          {/if}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...