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