custom/plugins/EmovaTheme/src/Resources/views/storefront/component/account/register.html.twig line 1

Open in your IDE?
  1. {% block component_account_register %}
  2.     <div class="card register-card">
  3.         <div class="card-body">
  4.             {% block component_account_register_header %}
  5.     {#            {% if cardTitle %}
  6.                     <div class="card-title">
  7.                         {{ cardTitle }}
  8.                     </div>
  9.                 {% endif %}
  10.    #}
  11.             {% endblock %}
  12.                  <div class="main-title">
  13.                         Persönliche Informationen
  14.                  </div>
  15.                 <p class="sub-title">
  16.                    Pflichtfelder* <br> Tragen Sie ihre persönlichen Daten ein.
  17.                 </p>
  18.             {% block component_account_register_form %}
  19.                 <form action="{{ path('frontend.account.register.save') }}"
  20.                       class="register-form"
  21.                       method="post"
  22.                       data-form-csrf-handler="true"
  23.                       data-form-validation="true">
  24.                     {% block component_account_register_form_csrf %}
  25.                         {{ sw_csrf('frontend.account.register.save') }}
  26.                     {% endblock %}
  27.                     {% block component_account_register_redirect %}
  28.                         <input type="hidden"
  29.                                name="redirectTo"
  30.                                value="{{ redirectTo }}">
  31.                         <input type="hidden"
  32.                                name="redirectParameters"
  33.                                value="{{ redirectParameters }}">
  34.                     {% endblock %}
  35.                     {% block component_account_register_create_account %}
  36.                     {% if feature('FEATURE_NEXT_16236') %}
  37.                         <input type="hidden"
  38.                                name="createCustomerAccount"
  39.                                value="1">
  40.                     {% endif %}
  41.                     {% endblock %}
  42.                     {% block component_account_register_form_action %}
  43.                         <input type="hidden"
  44.                                name="errorRoute"
  45.                                value="frontend.account.register.page"/>
  46.                         <input type="hidden"
  47.                                name="errorParameters"
  48.                                value="{{ errorParameters }}">
  49.                     {% endblock %}
  50.                     {% block component_account_register_personal %}
  51.                         <div class="register-personal">
  52.                             {% block component_account_register_personal_fields %}
  53.                                 {% block component_account_register_personal_address_fields %}
  54.                                     {% sw_include '@Storefront/storefront/component/address/address-personal.html.twig' with {
  55.                                         'showBirthdayField': config('core.loginRegistration.showBirthdayField'),
  56.                                         'accountType': data.get('accountType')
  57.                                     } %}
  58.                                 {% endblock %}
  59.                                 {% block component_account_register_company_fields %}
  60.                                     {% sw_include '@Storefront/storefront/component/address/address-personal-company.html.twig' with {
  61.                                         'prefix': 'billingAddress',
  62.                                         'address': data.get('billingAddress')
  63.                                     } %}
  64.                                 {% endblock %}
  65.                                 {% set formGroupMail %}
  66.                                     {% block component_account_register_personal_mail %}
  67.                                         {% block component_account_register_personal_mail_label %}
  68.                                             <label class="form-label"
  69.                                                    for="personalMail"><span>
  70.                                                 {{ "account.personalMailLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  71.                                                 </span></label>
  72.                                         {% endblock %}
  73.                                         {% block component_account_register_personal_mail_input %}
  74.                                             <input type="email"
  75.                                                    class="form-control{% if formViolations.getViolations('/email') is not empty %} is-invalid{% endif %}"
  76.                                                    autocomplete="section-personal email"
  77.                                                    id="personalMail"
  78.                                                    {#placeholder="{{ "account.personalMailPlaceholder"|trans|striptags }}"#}
  79.                                                    name="email"
  80.                                                    value="{{ data.get('email') }}"
  81.                                                    {% if config('core.loginRegistration.requireEmailConfirmation') %}
  82.                                                    data-form-validation-equal="personalMail"
  83.                                                    {% endif %}
  84.                                                    required="required">
  85.                                         {% endblock %}
  86.                                         {% block component_account_register_personal_mail_input_error %}
  87.                                             {% if formViolations.getViolations('/email') is not empty %}
  88.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  89.                                                     violationPath: '/email'
  90.                                                 } %}
  91.                                             {% endif %}
  92.                                         {% endblock %}
  93.                                     {% endblock %}
  94.                                 {% endset %}
  95.                                 {% set formGroupMailConfirmation %}
  96.                                     {% block component_account_register_personal_mail_confirmation %}
  97.                                         {% block component_account_register_personal_mail_confirmation_label %}
  98.                                             <label class="form-label"
  99.                                                    for="personalMailConfirmation"><span>
  100.                                                 {{ "account.personalMailConfirmationLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  101.                                                 </span></label>
  102.                                         {% endblock %}
  103.                                         {% block component_account_register_personal_mail_confirmation_input %}
  104.                                             <input type="email"
  105.                                                    class="form-control{% if formViolations.getViolations('/email') is not empty or formViolations.getViolations('/emailConfirmation') is not empty %} is-invalid{% endif %}"
  106.                                                    autocomplete="section-personal email"
  107.                                                    id="personalMailConfirmation"
  108.                                                    {#placeholder="{{ "account.personalMailConfirmationPlaceholder"|trans|striptags }}"#}
  109.                                                    name="emailConfirmation"
  110.                                                    value="{{ data.get('emailConfirmation') }}"
  111.                                                    data-form-validation-equal="personalMail"
  112.                                                    data-form-validation-equal-message="{{ "account.personalMailConfirmationInvalidMessage"|trans|striptags }}"
  113.                                                    required="required">
  114.                                         {% endblock %}
  115.                                         {% block component_account_register_personal_mail_confirmation_input_error %}
  116.                                             {% if formViolations.getViolations('/email') is not empty %}
  117.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  118.                                                     violationPath: '/email'
  119.                                                 } %}
  120.                                             {% endif %}
  121.                                             {% if formViolations.getViolations('/emailConfirmation') is not empty %}
  122.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  123.                                                     violationPath: '/emailConfirmation'
  124.                                                 } %}
  125.                                             {% endif %}
  126.                                         {% endblock %}
  127.                                     {% endblock %}
  128.                                 {% endset %}
  129.                                 {% set formGroupPassword %}
  130.                                     {% block component_account_register_personal_password %}
  131.                                         <span class="js-form-field-toggle-guest-mode">
  132.                                             {% block component_account_register_personal_password_label %}
  133.                                                 <label class="form-label"
  134.                                                        for="personalPassword"><span>
  135.                                                     {{ "account.personalPasswordLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  136.                                                 </span></label>
  137.                                             {% endblock %}
  138.                                             {% block component_account_register_personal_password_input %}
  139.                                                 <input type="password"
  140.                                                        class="form-control{% if formViolations.getViolations('/password') is not empty %} is-invalid{% endif %}"
  141.                                                        autocomplete="new-password"
  142.                                                        id="personalPassword"
  143.                                                        {#placeholder="{{ "account.personalPasswordPlaceholder"|trans|striptags }}"#}
  144.                                                        name="password"
  145.                                                        minlength="{{ config('core.loginRegistration.passwordMinLength') }}"
  146.                                                        {% if config('core.loginRegistration.requirePasswordConfirmation') %}
  147.                                                        data-form-validation-equal="newPassword"
  148.                                                        {% endif %}
  149.                                                        {% if config('core.loginRegistration.passwordMinLength') != 0 %}
  150.                                                        data-form-validation-length="{{ config('core.loginRegistration.passwordMinLength') }}"
  151.                                                        data-form-validation-length-message=" {{ "account.personalPasswordDescription"|trans({
  152.                                                            '%minLength%': config('core.loginRegistration.passwordMinLength')
  153.                                                        })|sw_sanitize }}"
  154.                                                        {% endif %}
  155.                                                        required="required">
  156.                                             {% endblock %}
  157.                                             {% block component_account_register_personal_password_description %}
  158.                                                 {% if config('core.loginRegistration.passwordMinLength') != 0 %}
  159.                                                     <small class="form-text js-validation-message"
  160.                                                            data-form-validation-length-text="true">
  161.                                                         {{ "account.personalPasswordDescription"|trans({
  162.                                                             '%minLength%': config('core.loginRegistration.passwordMinLength')
  163.                                                         })|sw_sanitize }}
  164.                                                     </small>
  165.                                                 {% endif %}
  166.                                             {% endblock %}
  167.                                             {% block component_account_register_personal_password_input_error %}
  168.                                                 {% if formViolations.getViolations('/password') is not empty %}
  169.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  170.                                                         violationPath: '/password'
  171.                                                     } %}
  172.                                                 {% endif %}
  173.                                             {% endblock %}
  174.                                         </span>
  175.                                     {% endblock %}
  176.                                 {% endset %}
  177.                                 {% set formGroupPasswordConfirmation %}
  178.                                     {% block component_account_register_personal_password_confirmation %}
  179.                                         <span class="js-form-field-toggle-guest-mode">
  180.                                             {% block component_account_register_personal_password_confirmation_label %}
  181.                                                 <label class="form-label"
  182.                                                        for="personalPasswordConfirmation"><span>
  183.                                                     {{ "account.personalPasswordConfirmationLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  184.                                                 </span></label>
  185.                                             {% endblock %}
  186.                                             {% block component_account_register_personal_password_confirmation_input %}
  187.                                                 <input type="password"
  188.                                                        class="form-control{% if formViolations.getViolations('/password') is not empty or formViolations.getViolations('/passwordConfirmation') is not empty %} is-invalid{% endif %}"
  189.                                                        autocomplete="new-password"
  190.                                                        id="personalPasswordConfirmation"
  191.                                                        {#placeholder="{{ "account.personalPasswordConfirmationPlaceholder"|trans|striptags }}"#}
  192.                                                        name="passwordConfirmation"
  193.                                                        minlength="{{ config('core.loginRegistration.passwordMinLength') }}"
  194.                                                        data-form-validation-equal="newPassword"
  195.                                                        data-form-validation-equal-message="{{ "account.personalPasswordConfirmationInvalidMessage"|trans|striptags }}"
  196.                                                        required="required">
  197.                                             {% endblock %}
  198.                                             {% block component_account_register_personal_password_confirmation_input_error %}
  199.                                                 {% if formViolations.getViolations('/password') is not empty %}
  200.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  201.                                                         violationPath: '/password'
  202.                                                     } %}
  203.                                                 {% endif %}
  204.                                                 {% if formViolations.getViolations('/passwordConfirmation') is not empty %}
  205.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  206.                                                         violationPath: '/passwordConfirmation'
  207.                                                     } %}
  208.                                                 {% endif %}
  209.                                             {% endblock %}
  210.                                         </span>
  211.                                     {% endblock %}
  212.                                 {% endset %}
  213.                                 {% block component_account_register_personal_account_fields %}
  214.                                     <div class="{{ formRowClass }}">
  215.                                         <div class="form-group form-group-text {% if not data.get('email') %} is-empty{% endif %}">
  216.                                             {{ formGroupMail }}
  217.                                         </div>
  218.                                     </div>
  219.                                     {% if config('core.loginRegistration.requireEmailConfirmation') %}
  220.                                         <div class="{{ formRowClass }}">
  221.                                             <div class="form-group form-group-text {% if not data.get('emailConfirmation') %} is-empty{% endif %}">
  222.                                                 {{ formGroupMailConfirmation }}
  223.                                             </div>
  224.                                         </div>
  225.                                     {% elseif not config('core.loginRegistration.requirePasswordConfirmation') %}
  226.                                         <div class="{{ formRowClass }}">
  227.                                             <div class="form-group form-group-text is-empty">
  228.                                                 {{ formGroupPassword }}
  229.                                             </div>
  230.                                         </div>
  231.                                     {% endif %}
  232.                                     <div class="{{ formRowClass }}">
  233.                                         <div class="form-group form-group-text is-empty">
  234.                                             {% if config('core.loginRegistration.requireEmailConfirmation') or config('core.loginRegistration.requirePasswordConfirmation') %}
  235.                                                 {{ formGroupPassword }}
  236.                                             {% endif %}
  237.                                         </div>
  238.                                     </div>
  239.                                     <div class="{{ formRowClass }}">
  240.                                         <div class="form-group form-group-text is-empty">
  241.                                             {% if config('core.loginRegistration.requirePasswordConfirmation') %}
  242.                                                 {{ formGroupPasswordConfirmation }}
  243.                                             {% endif %}
  244.                                         </div>
  245.                                     </div>
  246.                                 {% endblock %}
  247.                             {% endblock %}
  248.                         </div>
  249.                     {% endblock %}
  250.                     {% block component_account_register_address %}
  251.                         <div class="register-address" style="display: none !important">
  252.                             {% block component_account_register_address_fields %}
  253.                                 {% block component_account_register_address_shipping %}
  254.                                     <div class="register-shipping">
  255.                                         {% block component_account_register_address_shipping_header %}
  256.                                             <div class="card-title">
  257.                                                 {{ "account.registerShippingAddressHeader"|trans|sw_sanitize }}
  258.                                             </div>
  259.                                         {% endblock %}
  260.                                         {% block component_account_register_address_shipping_fields %}
  261.                                             {% block component_account_register_address_shipping_fields_personal %}
  262.                                                 {% sw_include '@Storefront/storefront/component/address/address-personal.html.twig' with {
  263.                                                     'prefix': 'shippingAddress',
  264.                                                     'data': data.get('shippingAddress'),
  265.                                                     'hideCustomerTypeSelect': false,
  266.                                                     'customToggleTarget': true,
  267.                                                     'accountType': data.get('shippingAddress').get('accountType'),
  268.                                                     'deliverStyle' : 'display: none !important'
  269.                                                 } %}
  270.                                             {% endblock %}
  271.                                             {% block component_account_register_address_shipping_fields_company %}
  272.                                                 {% sw_include '@Storefront/storefront/component/address/address-personal-company.html.twig' with {
  273.                                                     'prefix': 'shippingAddress',
  274.                                                     'customToggleTarget': true,
  275.                                                     'address': data.get('shippingAddress'),
  276.                                                     'deliverStyle' : 'display: none !important'
  277.                                                 } %}
  278.                                             {% endblock %}
  279.                                             {% block component_account_register_address_shipping_fields_address %}
  280.                                                 {% sw_include '@Storefront/storefront/component/address/address-form.html.twig' with {
  281.                                                     'prefix': 'shippingAddress',
  282.                                                     'data': data.get('shippingAddress'),
  283.                                                     'showNoShippingPostfix': true,
  284.                                                     'disableNonShippableCountries': true,
  285.                                                     'deliverStyle' : 'display: none !important'
  286.                                                 } %}
  287.                                             {% endblock %}
  288.                                         {% endblock %}
  289.                                     </div>
  290.                                 {% endblock %}
  291.                                 {% block component_account_register_address_different_shipping %}
  292.                                     <div>
  293.                                         {% block component_account_register_address_different_shipping_control %}
  294.                                             <div class="{{ formCheckboxWrapperClass }} register-different-shipping">
  295.                                                 {% block component_account_register_address_different_shipping_input %}
  296.                                                     <input type="checkbox"
  297.                                                            class="{{ formCheckInputClass }} js-different-shipping-checkbox"
  298.                                                            name="differentShippingAddress"
  299.                                                            value="1"
  300.                                                            id="differentShippingAddress"
  301.                                                            {% if data.get('differentShippingAddress') %}checked="checked"{% endif %}
  302.                                                            data-form-field-toggle="true"
  303.                                                            data-form-field-toggle-target=".js-form-field-toggle-shipping-address"
  304.                                                            data-form-field-toggle-value="true"
  305.                                                            data-form-field-toggle-trigger-nested="true">
  306.                                                 {% endblock %}
  307.                                                 {% block component_account_register_address_different_shipping_label %}
  308.                                                     <label class="custom-control-label no-validation"
  309.                                                            for="differentShippingAddress"><span>
  310.                                                         {{ "account.registerDifferentBilling"|trans|sw_sanitize }}
  311.                                                     </span></label>
  312.                                                 {% endblock %}
  313.                                             </div>
  314.                                             <script>
  315.                                                 (()=>{
  316.                                                     const checkbox = document.getElementsByName("differentShippingAddress")[0];
  317.                                                     checkbox.addEventListener("change", ()=>{
  318.                                                         localStorage.setItem("isDifferentShippingAddress", checkbox.checked ? "1" : "0");
  319.                                                         document.dispatchEvent(new Event("isDifferentShippingAddressChanged"));
  320.                                                     });
  321.                                                 })();
  322.                                             </script>
  323.                                         {% endblock %}
  324.                                         {% block component_account_register_address_billing %}
  325.                                             <div class="register-billing js-form-field-toggle-shipping-address d-none">
  326.                                                 {% block component_account_register_address_billing_header %}
  327.                                                     <div class="card-title">
  328.                                                         {{ "account.registerBillingAddressHeader"|trans|sw_sanitize }}
  329.                                                     </div>
  330.                                                 {% endblock %}
  331.                                                 {% block component_account_register_address_billing_fields %}
  332.                                                     {% sw_include '@Storefront/storefront/component/address/address-form.html.twig' with {
  333.                                                         'prefix': 'billingAddress',
  334.                                                         'data': data.get('billingAddress'),
  335.                                                         'showNoShippingPostfix': true,
  336.                                                     } %}
  337.                                                 {% endblock %}
  338.                                             </div>
  339.                                         {% endblock %}
  340.                                     </div>
  341.                                 {% endblock %}
  342.                             {% endblock %}
  343.                         </div>
  344.                     {% endblock %}
  345.                     {% block component_account_register_captcha %}
  346.                         {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { preCheck: true } %}
  347.                     {% endblock %}
  348.                     {% block component_account_register_privacy %}
  349.                         {% sw_include '@Storefront/storefront/component/privacy-notice.html.twig' %}
  350.                     {% endblock %}
  351.             {% block page_account_overview_newsletter_content_form_check_control %}
  352.                 <div class="{{ formCheckboxWrapperClass }}">
  353.                     {% block page_account_overview_newsletter_content_form_input %}
  354.                         {% set subscribe = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::OPTION_SUBSCRIBE') %}
  355.                         {% set direct = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::OPTION_DIRECT') %}
  356.                         {% set statusDirect = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_DIRECT') %}
  357.                         {% set statusOptIn = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_OPT_IN') %}
  358.                         {% set statusNotSet = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_NOT_SET') %}
  359.                         {% set status = false %}
  360.                         {% if newsletterAccountPagelet.newsletterStatus == statusDirect or newsletterAccountPagelet.newsletterStatus == statusOptIn or newsletterAccountPagelet.newsletterStatus == statusNotSet %}
  361.                             {% set status = true %}
  362.                         {% endif %}
  363.                         {% if feature('FEATURE_NEXT_14001') == false %}
  364.                             {% set status = customer.newsletter %}
  365.                         {% endif %}
  366.                         <input type="checkbox"
  367.                                class="{{ formCheckInputClass }}"
  368.                                id="newsletterRegister"
  369.                                name="option"
  370.                                autocomplete="off"
  371.                                value="{% if newsletterAccountPagelet.newsletterDoi %}{{ subscribe }}{% else %}{{ direct }}{% endif %}"
  372.                                {% if status %}checked="checked"{% endif %}>
  373.                     {% endblock %}
  374.                     {% block page_account_overview_newsletter_content_form_label %}
  375.                         <label class="{{ formCheckLabelClass }} custom-control-label"
  376.                                for="newsletterRegister">
  377.                             {{ "account.newsletterSettings"|trans({'%shopname%': config('core.basicInformation.shopName')})|sw_sanitize }}
  378.                         </label>
  379.                     {% endblock %}
  380.                 </div>
  381.             {% endblock %}
  382.                     {% block component_account_register_required_fields %}
  383.                         <p class="register-required-info">
  384.                             {{ "general.requiredFields"|trans|sw_sanitize }}
  385.                         </p>
  386.                     {% endblock %}
  387.                     {% block component_account_register_submit %}
  388.                         <div class="register-submit proceed-button-bar">
  389.                             <button id="goBackButton" type="button" class="btn button-zuruck">ZURÜCK</button>
  390.                             <button id="isAdultValue" type="submit"
  391.                                     class="btn btn-primary btn-lg" style="background-color: black !important; border-color: black !important;">
  392.                                 {{ "account.registerSubmit"|trans|sw_sanitize }}
  393.                             </button>
  394.                         </div>
  395.                         <style>
  396.                             .no-click {
  397.                                     pointer-events: none;
  398.                                 }
  399.                         </style>
  400.                         <script>
  401.                             document.addEventListener("isAdultChanged", function() {
  402.                                 const el = document.getElementById("isAdultValue");
  403.                                 if (localStorage.getItem("isAdult") === "1") {
  404.                                     el.classList.add("no-click");
  405.                                     el.disabled = true;
  406.                                 } else {
  407.                                     el.classList.remove("no-click");
  408.                                     el.disabled = false;
  409.                                 }
  410.                             });
  411.                             document.dispatchEvent(new Event("isAdultChanged"));
  412.                         </script>
  413.                     {% endblock %}
  414.                 </form>
  415.             {% endblock %}
  416.         </div>
  417.     </div>
  418. {% endblock %}