Files
kupshop/web/templates/elnino/ordering.user.tpl
2025-08-02 16:30:27 +02:00

636 lines
29 KiB
Smarty

{extends "ordering.tpl"}
{block "order-content"}
<h2>{t}Kontaktní údaje{/t}</h2>
{* omezeni delky inputu kvuli Swisspost *}
{if $cfg.Order.Countries['CH']}{$isSwiss = true}{/if}
{if $ctrl.logged}
<p>{t}Jste přihlášený jako uživatel {/t}{$ctrl.name} {$ctrl.surname} ({$ctrl.login}).</p>
<input type="hidden" name="invoice[email]" value="{$ctrl.login}">
{else}
<div class="signinrow">
{block "order-user-email"}
<div class="form-group form-group-legend required">
<label for="iemail" class="title-default">{t}Začněte zadáním e-mailu{/t}</label>
<input type="email" name="invoice[email]" id="iemail" value="{$body.invoice.email}"
class="form-control smartform-instance-invoice smartform-email"
data-bv-notempty="true" data-bv-emailaddress="true"
data-bv-emailaddress-message="{t}Zadejte platnou e-mailovou adresu{/t}">
<p>{t}Máte u nás účet?{/t} <a href="{url s=login}" class="cart-signin">{t}Přihlašte se{/t}</a></p>
</div>
{/block}
</div>
{/if}
<p class="title-default">{t}Kontaktní údaje{/t}</p>
<div class="row">
{block "user-data"}
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="iname">{t}Jméno{/t}</label>
<input type="text" name="invoice[name]" id="iname" class="form-control" value="{$body.invoice.name}"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2"
{if $isSwiss}data-bv-stringlength-max="14"{/if}>
</div>
</div>
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="isurname">{t}Příjmení{/t}</label>
<input type="text" name="invoice[surname]" id="isurname" class="form-control"
value="{$body.invoice.surname}"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2"
{if $isSwiss}data-bv-stringlength-max="20"{/if}>
</div>
</div>
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="iphone">{t}Telefon{/t}</label>
<input type="tel" name="invoice[phone]" id="iphone" class="form-control smartform-instance-invoice smartform-phone-number" value="{$body.invoice.phone}"
data-bv-notempty="true" data-bv-phone="true" data-bv-phone-country="invoice[country]"
data-bv-phone-message="{t}Zadejte platné telefoní číslo{/t}">
</div>
</div>
{/block}
{block "order-user-street"}
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="istreet">{t}Ulice a č.p.{/t}</label>
<input type="text" name="invoice[street]" id="istreet" class="form-control smartform-instance-invoice smartform-address-street-and-number"
value="{$body.invoice.street}"
data-bv-notempty="true" {if $isSwiss}data-bv-stringlength="true"
data-bv-stringlength-max="35"{/if}>
</div>
</div>
{/block}
<div class="zip-group col-xxs-12 col-sm-6">
{block "order-user-city"}
<div class="form-group required">
<label for="icity">{t}Město{/t}</label>
<input type="text" name="invoice[city]" id="icity" class="form-control smartform-instance-invoice smartform-address-city" value="{$body.invoice.city}"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2"
{if $isSwiss}data-bv-stringlength="true" data-bv-stringlength-max="35"{/if}>
</div>
{/block}
<div class="form-group required">
<label for="izip">{t}PSČ{/t}</label>
<input type="text" name="invoice[zip]" id="izip" class="form-control smartform-instance-invoice smartform-address-zip" value="{$body.invoice.zip}"
data-bv-notempty="true" data-bv-zipcode="true" data-bv-zipcode-country="invoice[country]"
data-bv-zipcode-message="{t}Zadejte platné PSČ{/t}">
</div>
</div>
{block "order-user-country"}
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="icountry">{t}Stát{/t}</label>
{get_contexts country=1 assign='country_context'}
{if $body.invoice.country}
{$active = $body.invoice.country}
{else}
{$active = $country_context.country->getActive()->getId()}
{/if}
{if $tpl_vars.delivery_country_picker}
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
{/if}
<select class="form-control custom-select" id="icountry" name="invoice[country]"
{if $cfg.Order.Countries|count == 1}readonly{/if}>
{html_options options=$cfg.Order.Countries selected=$active}
</select>
</div>
</div>
{/block}
<div class="col-xxs-12">
<div class="form-group">
<label for="icustom_address">{t}Upřesnění adresy (firma, areál,…){/t}</label>
<input type="text" name="invoice[custom_address]" id="icustom_address" class="form-control" value="{$body.invoice.custom_address}"
{if $isSwiss}data-bv-stringlength="true" data-bv-stringlength-max="35"{/if}>
</div>
</div>
</div>
{$deliveryType = $body->getDeliveryType()}
{if $deliveryType and $deliveryType->getPayment() and $deliveryType->getPayment()->class === 'Intrum'}
{* todo redesign *}
<hr>
<div class="row">
<div class="col-xxs-12 col-sm-6">
<div class="form-group">
<label for="igender">{t}Pohlaví{/t}</label>
<select class="form-control custom-select" id="igender" name="invoice[gender]">
<option value="male"{if $body.invoice.gender !== 'female'} selected="selected"{/if}>{t}muž{/t}</option>
<option value="female"{if $body.invoice.gender === 'female'} selected="selected"{/if}>{t}žena{/t}</option>
</select>
</div>
</div>
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="ibirthdate">{t}Datum narození{/t}</label>
<input type="text" name="invoice[birthdate]" id="ibirthdate" class="form-control"
value="{$body.invoice.birthdate}"
data-bv-notempty="true" data-bv-regexp="true" data-bv-regexp-message="YYYY-MM-DD"
data-bv-regexp-regexp="^\d{ldelim}4{rdelim}-([0]\d|1[0-2])-([0-2]\d|3[01])$">
</div>
</div>
</div>
{/if}
{if !$ctrl.logged}
<div class="form-group">
<label for="new-account" class="custom-control custom-checkbox">
<input type="checkbox" name="new-account" id="new-account" class="custom-control-input"
data-opener="[data-password]" {if $body.register}checked{/if}>
<span class="custom-control-indicator"></span>
{t}Chci vytvořit účet{/t}
<span class="clear-alt-address" style="display: none;">{t}zrušit{/t}</span>
</label>
</div>
{* pokud jednou submittnu heslo, už se nedá vymazat, protože odchecknutí checkboxu input s heslem disabluje,
takže se neodešle s prázdnou hodnotou. Prázdný hidden input se odešle. *}
<input type="hidden" name="password" value="">
<div class="opener-content" style="display: {if $body.register}block{else}none{/if};"
data-password>
<div class="row">
<div class="col-lg-6 col-xxs-12">
<div id="passwords">
<div class="form-group form-group-legend required">
<label for="password">{t}Heslo{/t}</label>
{block "password"}
<input type="password" name="password" value="{$body.register}" id="password" class="form-control"
autocomplete="new-password"
{if !$body.register}disabled{/if} data-bv-notempty="true"
data-bv-stringlength="true" data-bv-stringlength-min="6">
{/block}
<a href="#" data-toggle-password>{t}Zobrazit{/t}</a>
</div>
</div>
</div>
{block 'gender'}
<div class="col-xxs-12 col-sm-6">
<div class="form-group form-group-legend">
<label for="igender">{t}Pohlaví{/t}</label>
<select class="form-control custom-select" id="igender" name="invoice[gender]">
<option value=""{if !$body.invoice.gender} selected="selected"{/if}>{t}Neuvedeno{/t}</option>
<option value="male"{if $body.invoice.gender === 'male'} selected="selected"{/if}>{t}muž{/t}</option>
<option value="female"{if $body.invoice.gender === 'female'} selected="selected"{/if}>{t}žena{/t}</option>
</select>
<span class="text-muted">{t}Nepovinné{/t}</span>
</div>
</div>
{/block}
{* todo: upravit JS na checkbox <a href="#" class="email-unregister">Zrušit registraci</a>*}
{* todo: upravit email validaci na BSV <div id="email-text">
<p>{t}Zadejte prosím pečlivě svůj e-mail.{/t}</p>
</div>*}
</div>
</div>
{/if}
{* nákup na firmu *}
{if $ctrl.active_country == "CZ"}
<div class="form-group">
<label for="firm-address" class="custom-control custom-checkbox" data-cart-noreload>
<input type="hidden" name="firm_address" value="0">
<input type="checkbox" name="firm_address" id="firm-address" class="custom-control-input"
data-opener="[data-firm-address]" {$body.invoice.firm|checked}>
<span class="custom-control-indicator"></span>
{t}Nakupuji na firmu (IČ, DIČ){/t}
<span class="clear-alt-address" style="display: none;">{t}smazat{/t}</span>
</label>
</div>
{if $showCopyEmail}
{$fieldWidth = 3}
{else}
{$fieldWidth = 4}
{/if}
<div class="opener-content" {if !$body.invoice.firm}style="display: none;"{/if} data-firm-address>
<div class="row">
<div class="col-xxs-12 col-sm-{$fieldWidth}">
<div class="form-group required">
<label for="ifirm">{t}Název firmy{/t}</label>
<input type="text" name="invoice[firm]" id="ifirm" class="form-control smartform-company-name" value="{$body.invoice.firm}"
autocomplete="off" data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
</div>
</div>
{if $showCopyEmail}
<div class="col-xxs-12 col-sm-{$fieldWidth}">
<div class="form-group required">
<label for="icopy_email">{t}E-mail pro fakturaci{/t}</label>
<input type="text" name="invoice[copy_email]" id="icopy_email"
class="form-control smartform-instance-invoice smartform-email"
value="{$body.invoice.copy_email}"
autocomplete="off">
</div>
</div>
{/if}
<div class="col-xxs-12 col-sm-{$fieldWidth}">
<div class="form-group required">
<label for="iico">{t}IČO{/t}</label>
<input type="number" name="invoice[ico]" id="iico" class="form-control disable-spinner smartform-company-registration-number" value="{$body.invoice.ico}"
autocomplete="off" data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="8"
data-bv-stringlength-max="10">
</div>
</div>
<div class="col-xxs-12 col-sm-{$fieldWidth}">
<div class="form-group required">
<label for="idic">{t}DIČ{/t}</label>
<input type="text" name="invoice[dic]" id="idic" class="form-control smartform-company-vat-number" value="{$body.invoice.dic}"
autocomplete="off" data-bv-notempty="true" data-bv-vat="true" data-bv-vat-country="invoice[country]">
</div>
</div>
</div>
</div>
{/if}
{* nejdriv check zda existuje deliverytype *}
{* skryt fakt. adresu pokud deliverytype nevyzaduje dor. adresu (napr. balik na postu) *}
{if !$deliveryType || $deliveryType->getDelivery()->requiresDeliveryAddress()}
<div class="form-group">
<label for="different-address" class="custom-control custom-checkbox">
<input type="hidden" name="different_address" value="0">
<input class="custom-control-input" type="checkbox" name="different_address"
data-opener="#different-address-content" id="different-address"
{if $body.delivery.name}checked{/if}>
<span class="custom-control-indicator"></span>
{t}Dodání na jinou adresu nebo do zaměstnání{/t}
<span class="clear-alt-address" style="display: none;">smazat</span>
</label>
</div>
<div class="opener-content" id="different-address-content"
style="display:{if $body.delivery.name}block{else}none{/if}">
<p class="title-default">{t}Dodací adresa{/t}</p>
<div class="row">
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="name">{t}Jméno{/t}</label>
<input type="text" name="delivery[name]" id="name" class="form-control"
value="{$body.delivery.name}" autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
</div>
</div>
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="surname">{t}Příjmení{/t}</label>
<input type="text" name="delivery[surname]" id="surname" class="form-control"
value="{$body.delivery.surname}" autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
</div>
</div>
{block "delivery-phone"}{/block}
<div class="col-xxs-12 col-sm-6">
{block "delivery-street"}
<div class="form-group required">
<label for="street">{t}Ulice a č.p.{/t}</label>
<input type="text" name="delivery[street]" id="street" class="form-control smartform-instance-delivery smartform-address-street-and-number"
value="{$body.delivery.street}" autocomplete="off"
data-bv-notempty="true" data-bv-regexp="true" pattern=".*\S+\s+[0-9]+.*"
data-bv-regexp-message="{t}Doplňte prosím číslo popisné{/t}">
</div>
{/block}
</div>
<div class="col-xxs-12 col-sm-6">
<div class="zip-group">
<div class="form-group required">
<label for="city">{t}Město{/t}</label>
<input type="text" name="delivery[city]" id="city" class="form-control smartform-instance-delivery smartform-address-city"
value="{$body.delivery.city}" autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
</div>
<div class="form-group required">
<label for="zip">{t}PSČ{/t}</label>
<input type="text" name="delivery[zip]" id="zip" class="form-control smartform-instance-delivery smartform-address-zip" value="{$body.delivery.zip}"
autocomplete="off" data-bv-notempty="true" data-bv-zipcode="true"
data-bv-zipcode-country="delivery[country]">
</div>
</div>
</div>
<div class="col-xxs-12 col-sm-6">
<div class="form-group required">
<label for="country">{t}Stát{/t}
{if $tpl_vars.delivery_country_picker}
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
{/if}
</label>
<select class="form-control" id="country" name="delivery[country]" autocomplete="off"
{if $cfg.Order.Countries|count == 1}readonly{/if}>
{html_options options=$cfg.Order.Countries selected=$body.delivery.country|default:$ctrl.active_country}
</select>
</div>
</div>
{block "delivery-address-specification"}
<div class="col-xxs-12 col-sm-6">
<div class="form-group">
<label for="dcustom_address">{t}Upřesnění adresy (firma, areál,…){/t}</label>
<input type="text" name="delivery[custom_address]" id="dcustom_address" class="form-control" value="{$body.delivery.custom_address}"
{if $isSwiss}data-bv-stringlength="true" data-bv-stringlength-max="35"{/if}>
</div>
</div>
{/block}
{block "delivery-custom-data"}{/block}
</div>
</div>
{/if}
{* pokud je os. odběr, vymazat del. adress, mohla zbyt z předchozího průchodu košíkem *}
{if $deliveryType and $deliveryType->isInPerson()}
<input type="hidden" name="delivery[name]" value="">
<input type="hidden" name="delivery[surname]" value="">
<input type="hidden" name="delivery[custom_address]" value="">
<input type="hidden" name="delivery[firm]" value="">
<input type="hidden" name="delivery[street]" value="">
<input type="hidden" name="delivery[city]" value="">
<input type="hidden" name="delivery[zip]" value="">
<input type="hidden" name="delivery[country]" value="">
{/if}
{block 'firm-address-checkbox'}
{*
<div class="form-group">
<label for="firm-address" class="custom-control custom-checkbox">
<input type="hidden" name="firm_address" value="0">
<input type="checkbox" name="firm_address" id="firm-address" class="custom-control-input"
data-opener="[data-firm-address]" {$body.invoice.firm|checked}>
<span class="custom-control-indicator"></span>
{t}Nakupuji na firmu (IČ, DIČ){/t}
<span class="clear-alt-address" style="display: none;">{t}smazat{/t}</span>
</label>
</div>
<div class="opener-content" style="display:{if $body.invoice.firm}block{else}none{/if}"
data-firm-address>
{block 'firm-address'}
<p class="title-default">{t}Firemní údaje{/t}</p>
<div class="row ico-row">
<div class="col-sm-6 col-xxs-12">
<div class="form-group required">
<label for="iico">{t}IČO{/t}</label>
<input type="number" name="invoice[ico]" id="iico" class="form-control disable-spinner"
value="{$body.invoice.ico}" autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="8"
data-bv-stringlength-max="10">
</div>
</div>
<div class="col-sm-6 col-xxs-12">
{ * todo * }
<div class="form-group">
<a href="" class="btn btn-muted btn-block">{t}Načíst údaje podle IČ{/t}</a>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xxs-12">
<div class="form-group">
<label for="idic">{t}DIČ{/t}</label>
<input type="text" name="invoice[dic]" id="idic" class="form-control" value="{$body.invoice.dic}"
autocomplete="off"
data-bv-vat="true" data-bv-vat-country="invoice[country]">
</div>
</div>
<div class="col-sm-6 col-xxs-12">
<div class="form-group required">
<label for="ifirm">{t}Společnost{/t}</label>
<input type="text" name="invoice[firm]" id="ifirm" class="form-control" value="{$body.invoice.firm}"
autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
</div>
</div>
</div>
{/block}
{ * mam osobni odber (nevyzaduje zadani adresy), chci fakturu na firmu * }
{if $deliveryType and $deliveryType->isInPerson() and !$inpersonRequireAddress}
<div class="row">
<div class="{$column_class}">
<div class="form-group required">
<label for="istreet">{t}Ulice a č.p.{/t}</label>
<input type="text" name="invoice[street]" id="istreet" class="form-control"
value="{$body.invoice.street}" autocomplete="off"
data-bv-notempty="true" data-bv-regexp="true" pattern=".*\S+\s+[0-9]+.*"
data-bv-regexp-message="{t}Doplňte prosím číslo popisné{/t}">
</div>
</div>
<div class="col-lg-3 col-sm-6 col-xxs-12">
<div class="form-group required">
<label for="icity">{t}Město{/t}</label>
<input type="text" name="invoice[city]" id="icity" class="form-control"
value="{$body.invoice.city}" autocomplete="off"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
</div>
</div>
<div class="col-xl-2 col-lg-3 col-sm-6 col-xxs-12">
<div class="form-group required">
<label for="izip">{t}PSČ{/t}</label>
<input type="text" name="invoice[zip]" id="izip" class="form-control" value="{$body.invoice.zip}"
autocomplete="off" data-bv-notempty="true" data-bv-zipcode="true"
data-bv-zipcode-country="invoice[country]">
</div>
</div>
<div class="{$column_class}">
<div class="form-group required">
<label for="icountry">{t}Stát{/t}
{if $tpl_vars.delivery_country_picker}
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
{/if}
</label>
<select class="form-control c-select custom-select" id="icountry" name="invoice[country]"
autocomplete="off" {if $cfg.Order.Countries|count == 1}readonly{/if}>
{html_options options=$cfg.Order.Countries selected=$body.invoice.country|default:$ctrl.active_country}
</select>
</div>
</div>
</div>
{/if}
</div>
*}
{/block}
{block "order-note"}
<div class="form-group">
<label for="noteUser" class="title-default">{t}Poznámka k objednávce{/t}</label>
<textarea name="noteUser" id="noteUser" class="form-control">{$body.note}</textarea>
</div>
{/block}
<div class="alert alert-danger" role="alert" data-alert="wrong-country" style="display: none;">
Vybraná země doručení není obsluhována vybraným způsobem dopravy. Prosím upravte zemi doručení nebo <a
href="/kosik/doprava-platba/">způsob dopravy</a>.
</div>
{include 'ordering/ordering.gdpr.tpl'}
{include "block.addressValidation.tpl"}
{/block}
<script>
{block onready append}
var $form = $('#cart');
$form.cart();
{block "form-validation"}
$form.bootstrapValidator({
feedbackIcons: {
valid: 'fc fc-check',
invalid: 'fc fc-remove',
validating: 'fc fc-refresh',
}
}).on('change', '[data-bv-notempty]', function(event) {
var $this = $(event.target),
elementName = $this.attr('name');
$(event.target.form)
// Get the bootstrapValidator instance
.data('bootstrapValidator')
// Mark the field as not validated, so it'll be re-validated when the user change date
.updateStatus(elementName, 'NOT_VALIDATED', null)
// Validate the field
.validateField(elementName);
}).on('validationError.validator.bv', function(e, data) {
// Disable multiple error messages for one field
data.element.data('bv.messages')
// Hide all the messages
.find('.help-block[data-bv-for="' + data.field + '"]').hide()
// Show only message associated with current validator
.filter('[data-bv-validator="' + data.validator + '"]').show();
}).on('submit', function() {
var err = $form.find('.has-error').first();
if (err.length && !wpj.domUtils.isInView(err)) {
wpj.domUtils.scrollTo(err);
}
return true;
});
{block "doCheckEmail"}
function doCheckEmail() {
var email = $('#iemail').val(),
message = '',
regexp = {literal}/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i{/literal};
if (!regexp.test(email)) {
message += '{t escape=js}Jste si jistí správností e-mailové adresy?{/t}';
showMessage(message);
} else {
var data = {
'email': email,
};
$.post('/launch.php?s=ajax&type=email', data, function(data) {
if (data.found) {
message = '{t escape=js}Již u nás máte účet{/t}. <a href="{url s=login}" class="cart-signin">{t}Přihlaste se{/t}</a>';
} else {
message = '{t escape=js}Registrace své výhody{/t}. <a href="{url s=user act=new}" class="email-register">{t}Vytvořit účet{/t}</a>?';
}
showMessage(message);
}, 'json');
}
}
function checkEmail() {
wpj.domUtils.resetTimer('iemail', 500, doCheckEmail);
}
var $message = $('#email-text'),
$passwords = $('#passwords'),
c = $('form[role=form]');
function showMessage(message) {
$message.html('<div><p>' + message + '</p></div>');
}
{/block}
var $email = $('#iemail');
$email.on('keydown input change validate', checkEmail);
if ($email.val()) {
$email.trigger('validate');
}
{/block}
{if !$ctrl.logged}
$form.on('change', '#new-account', function() {
var $field = $('#password')
$field.prop('disabled', !$(this).prop('checked'));
//$form.data('bootstrapValidator').resetForm();
//wpj.domUtils.crossFade($message, $passwords);
//enablePasswordValidation(register);
return false;
});
/*function enablePasswordValidation(enable) {
$form.bootstrapValidator('enableFieldValidators', 'password', enable);
}
enablePasswordValidation({if $body.register}true{else}false{/if});*/
{/if}
{* Revalidace po změně země jen pokud mam na vyber vic zemi *}
{*{if $cfg.Order.Countries|count > 1}
var reCheckField = function(fieldName) {
$.each(fieldName, function(i, field) {
*}{* preskoc otravnou validaci prazdnych poli *}{*
if (!$form.find('[name="' + field + '"]').val())
return true;
$form.data('bootstrapValidator').updateStatus(field, 'NOT_VALIDATED').validateField(field);
});
};
$('#icountry').on('change', function() {
reCheckField(['invoice[phone]', 'invoice[zip]']);
});
{/if}*}
{* nákup na firmu *}
{if $ctrl.active_country == "CZ"}
$('#firm-address').on('keydown input change click', function() {
{* abra accepts only single value as adName/amName, so ignore custom_address in case company (firm) address is enabled *}
$('#icustom_address').prop('disabled', $(this).is(':checked'));
});
{/if}
$form.on('click', '[data-toggle-password]', function (e) {
var $pw_field = $('#password');
if ($pw_field.attr('type') == 'password') {
$pw_field.attr('type', 'text');
$(this).html('{t}Skrýt{/t}');
} else {
$pw_field.attr('type', 'password');
$(this).html('{t}Zobrazit{/t}');
}
return false;
});
$('#news').change(function() {
$(this).is(':checked') ? $('[name="news"]').val(0) : $('[name="news"]').val(1);
});
{* Opětovné enablovaní submitu pokud vypnu nákup na firmu nebo dodání na jinou adresu *}
$form.on('change', '#different-address, #firm-address', function() {
if (typeof $form.data('bootstrapValidator') === 'object') {
$form.data('bootstrapValidator').resetForm();
}
});
wpj.domUtils.initOpeners();
{/block}
</script>
{block analytics append}
{include "components/block.smartForm.tpl"}
{/block}