first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,311 @@
{extends 'index.tpl'}
{block "css-entry" append}
{encore_entry_link_tags entry='user'}
{/block}
{block "main-class"}container main-registration-b2b{/block}
{block "content"}
<div class="registration-b2b-title-wrapper">
<h1 class="text-center">{block "registration-b2b-title"}{$view->getTitle()}{/block}</h1>
{if !$ctrl.logged}
<div class="b2b-login-wrapper">
<form method="post" action="{url s=login}" class="b2b-login-form">
<p class="title-default">{t}Přihlášení do B2B{/t}</p>
{block 'redirect-url'}
<input type="hidden" name="url" value="{$ctrl.currUrl.Rel}">
{/block}
<div class="form-group">
<input type="email" name="login" value="{$body.inputLogin}" placeholder="{t}E-mail{/t}"
class="form-control">
</div>
<div class="form-group form-group-pw">
<input type="password" name="password" value="" placeholder="{t}Heslo{/t}" class="form-control" autocomplete=current-password>
<p class="forgotten-pw"><a href="{url s=login act=passw}">{t}Zapomenuté heslo{/t}</a></p>
</div>
<div class="form-group">
<input class="btn btn-primary" type="submit" value="{t}Přihlásit se{/t}" name="Submit">
</div>
</form>
</div>
{/if}
</div>
<div class="registration-b2b-form-wrapper">
{block "form-content-top"}
{insert_page code='registration-b2b'}
{/block}
<div data-reload="registration-b2b">
{if $body.sent}
<div class="alert alert-success">
{t}Žádost o spolupráci byla úspěšně odeslána. Odpovíme Vám co nejdříve.{/t}
</div>
{else}
{if $body.error}
<div class="alert alert-danger">
{$body.error}
</div>
{/if}
<form name="registration-b2b" method="post" action="{$ctrl.currUrl.Abs}" class="registration-form"
enctype="multipart/form-data" data-form="user" data-registration-b2b-form{ifmodule RECAPTCHA__CLOUDFLARE} data-wpj-captcha-lazy="registration-b2b-form"{/ifmodule}>
{include "block.messages.tpl"}
<input type="hidden" name="url" value="{$body.data.url}">
<input type="hidden" name="gtm_type" value="{t}Registrace B2B{/t}">
{block "form-content-title"}
<h3 class="text-center">{t}Jak zahájit spolupráci{/t}</h3>
{/block}
<div class="row">
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="name" class="required">{t}Jméno{/t}</label>
<input type="text" name="name" id="name" class="form-control" value="{$body.data.name}"
data-bv-notempty="true" data-bv-stringlength="true"
data-bv-stringlength-min="3">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="surname" class="required">{t}Příjmení{/t}</label>
<input type="text" name="surname" id="surname" class="form-control" value="{$body.data.surname}"
data-bv-notempty="true" data-bv-stringlength="true"
data-bv-stringlength-min="3">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="email" class="required">{t}E-mail{/t}</label>
<input type="email" name="email" id="email" class="form-control smartform-instance-invoice smartform-email"
value="{$body.data.email}"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="6">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="phone" class="required">{t}Telefon{/t}</label>
<input type="text" name="phone" id="phone" class="form-control smartform-instance-invoice smartform-phone-number"
value="{$body.data.phone}"
data-bv-notempty="true" data-bv-phone="true" data-bv-phone-country="country">
</div>
</div>
<div class="col-xxs-12">
<div class="form-group required">
<label for="firm" class="required">{t}Název firmy{/t}</label>
<input type="text" name="firm" id="firm" class="form-control smartform-instance-invoice smartform-company-name" value="{$body.data.firm}"
data-bv-notempty="true" data-bv-stringlength="true"
data-bv-stringlength-min="3">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="ic" class="">{t}IČO{/t}</label>
<input type="text" name="ico" id="ic" class="form-control smartform-instance-invoice smartform-company-registration-number" value="{$body.data.ic}"
data-bv-stringlength="true" data-bv-stringlength-min="8"
data-bv-stringlength-max="10" data-bv-notempty="true">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group">
<label for="dic" class="">{t}DIČ{/t}</label>
<input type="text" name="dic" id="dic" class="form-control smartform-instance-invoice smartform-company-vat-number" value="{$body.data.dic}"
data-bv-stringlength="true" data-bv-stringlength-min="10"
data-bv-stringlength-max="12">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="street" class="required">{t}Ulice a č.p.{/t}</label>
<input type="text" name="street" id="street" class="form-control smartform-instance-invoice smartform-company-address-street-and-number smartform-address-street-and-number"
value="{$body.data.street}"
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-6 col-xxs-12">
<div class="zip-group">
<div class="form-group required">
<label for="city">{t}Město{/t}</label>
<input type="text" name="city" id="city" class="form-control smartform-instance-invoice smartform-company-address-city smartform-address-city" value="{$body.data.city}"
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="zip" id="zip" class="form-control smartform-instance-invoice smartform-company-address-zip smartform-address-zip" value="{$body.data.zip}"
data-bv-notempty="true" data-bv-zipcode="true" data-bv-zipcode-country="country">
</div>
</div>
</div>
<div class="col-xxs-12">
<div class="form-group required">
<label for="country">{t}Stát{/t}</label>
{$activeCountry = $body.data.country|default:$ctrl.active_country}
{get_contexts country=1 assign='country_context'}
<select name="country" class="custom-select form-control" id="country"
{if $country_context.country->getAll()|count == 1}readonly{/if}>
{foreach $country_context.country->getAll() as $country}
<option value="{$country->getId()}" {if $activeCountry == $country->getId()}selected{/if}>
{$country->getName()}
</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="different_address" class="custom-control custom-checkbox custom-checkbox-lg">
<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">
<span class="c-indicator custom-control-indicator"></span>
<span>{t}Zvolit jinou dodací adresu{/t}</span>
</label>
</div>
</div>
</div>
<div id="different-address-content" style="display:none" class="opener-content">
<div class="row" data-count="0" data-delivery-row>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="dname" class="required">{t}Jméno{/t}</label>
<input type="text" name="dname" id="dname" class="form-control" value="{$body.data.dname}"
data-bv-notempty="true" data-bv-stringlength="true"
data-bv-stringlength-min="3">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="dsurname" class="required">{t}Příjmení{/t}</label>
<input type="text" name="dsurname" id="dsurname" class="form-control" value="{$body.data.dsurname}"
data-bv-notempty="true" data-bv-stringlength="true"
data-bv-stringlength-min="3">
</div>
</div>
<div class="col-lg-6 col-xxs-12">
<div class="form-group required">
<label for="dstreet" class="required">{t}Ulice a č.p.{/t}</label>
<input type="text" name="dstreet" id="dstreet" class="form-control smartform-instance-delivery smartform-address-street-and-number"
value="{$body.data.dstreet}"
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-6 col-xxs-12">
<div class="zip-group">
<div class="form-group required">
<label for="dcity">{t}Město{/t}</label>
<input type="text" name="dcity" id="dcity" class="form-control smartform-instance-delivery smartform-address-city" value="{$body.data.dcity}"
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
</div>
<div class="form-group required">
<label for="dzip">{t}PSČ{/t}</label>
<input type="text" name="dzip" id="dzip" class="form-control smartform-instance-delivery smartform-address-zip" value="{$body.ddata.zip}"
data-bv-notempty="true" data-bv-zipcode="true" data-bv-zipcode-country="country">
</div>
</div>
</div>
</div>
</div>
<div class="registration-submit">
{* @formatter:off *}
<p class="registration-consent">
{t consent={url s=page label='consent'} privacyPolicy={url s=page label='privacy_policy'} escape=false}Odesláním formuláře souhlasím se <a href="{consent}" target="_blank">zpracováním osobních údajů za účelem registrace</a> a beru na vědomí <a href="{privacyPolicy}" target="_blank">Zásady zpracování osobních údajů</a>.{/t}
</p>
{* @formatter:on *}
{if $dbcfg.b2b.formCreateUser == "Y"}
<input type="hidden" name="get_news" value="force">
{/if}
<input type="hidden" name="send_to" value="{$dbcfg.b2b.formCreateEmail|default:$dbcfg.order_shopkeeper_mail}">
{ifmodule RECAPTCHA__CLOUDFLARE}
<input class="btn btn-primary" type="submit" name="Submit" value="{t}Odeslat registraci{/t}">
{elsemodule}
{include "block.recaptcha.invisible.tpl"}
{captchaBtn text="{t}Odeslat registraci{/t}"}
{/ifmodule}
</div>
</form>
{/if}
</div>
</div>
{block "form-content-bottom"}{/block}
<script>
wpj.onReady.push(function () {
var $form = $('form[data-registration-b2b-form]');
if ($form.length) {
$form
.bootstrapValidator({
feedbackIcons: {
valid: 'fc fc-check',
invalid: 'fc fc-remove',
validating: 'fc fc-refresh',
},
})
.on('success.form.bv', function (e) {
e.preventDefault();
$form
.find('[data-opener]')
.not(':checked')
.each(function() {
$($(this).attr('data-opener'))
.find('input')
.val('');
});
var err = $('.has-error').first();
if (err.length && !wpj.domUtils.isInView(err)) {
wpj.domUtils.scrollTo(err);
return false;
}
var valid_recaptcha = 1;
{if findModule('recaptcha','registration') and findModule('recaptcha','site_invisible') and !findModule('recaptcha', 'cloudflare')}
valid_recaptcha = grecaptcha.getResponse();
{/if}
if (valid_recaptcha) {
var $this = $form,
data = $form.serialize(),
url = $form.attr('action');
{include "block.gtm.tpl" gtm_type="form_conversion"}
wpj.domUtils.reloadPartsFromUrl(url, $form.closest('[data-reload]'), data);
}
});
}
})
</script>
{/block}
{block "js-entry" append}
{encore_entry_script_tags entry='user'}
{/block}
{block "js-dynamic-load" append}
{asset_compile}
<script src="/common/static/bootstrapvalidator/js/bootstrapValidator.js"></script>
<script src="/common/static/bootstrapvalidator/js/language/{$ctrl.active_language_code}.js"></script>
{/asset_compile}
{if findModule('recaptcha','registration') and findModule('recaptcha','site_invisible') and !findModule('recaptcha', 'cloudflare')}
{captchaScript}
{/if}
{/block}
{block analytics append}
{include "components/block.smartForm.tpl"}
{/block}