vendor/shopware/storefront/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.             {% 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.                                     {% block component_account_register_personal_mail %}
  60.                                         {% block component_account_register_personal_mail_label %}
  61.                                             <label class="form-label"
  62.                                                    for="personalMail">
  63.                                                 {{ "account.personalMailLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  64.                                             </label>
  65.                                         {% endblock %}
  66.                                         {% block component_account_register_personal_mail_input %}
  67.                                             <input type="email"
  68.                                                    class="form-control{% if formViolations.getViolations('/email') is not empty %} is-invalid{% endif %}"
  69.                                                    autocomplete="section-personal email"
  70.                                                    id="personalMail"
  71.                                                    placeholder="{{ "account.personalMailPlaceholder"|trans|striptags }}"
  72.                                                    name="email"
  73.                                                    value="{{ data.get('email') }}"
  74.                                                    {% if config('core.loginRegistration.requireEmailConfirmation') %}
  75.                                                    data-form-validation-equal="personalMail"
  76.                                                    {% endif %}
  77.                                                    required="required">
  78.                                         {% endblock %}
  79.                                         {% block component_account_register_personal_mail_input_error %}
  80.                                             {% if formViolations.getViolations('/email') is not empty %}
  81.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  82.                                                     violationPath: '/email'
  83.                                                 } %}
  84.                                             {% endif %}
  85.                                         {% endblock %}
  86.                                     {% endblock %}
  87.                                 {% endset %}
  88.                                 {% set formGroupMailConfirmation %}
  89.                                     {% block component_account_register_personal_mail_confirmation %}
  90.                                         {% block component_account_register_personal_mail_confirmation_label %}
  91.                                             <label class="form-label"
  92.                                                    for="personalMailConfirmation">
  93.                                                 {{ "account.personalMailConfirmationLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  94.                                             </label>
  95.                                         {% endblock %}
  96.                                         {% block component_account_register_personal_mail_confirmation_input %}
  97.                                             <input type="email"
  98.                                                    class="form-control{% if formViolations.getViolations('/email') is not empty or formViolations.getViolations('/emailConfirmation') is not empty %} is-invalid{% endif %}"
  99.                                                    autocomplete="section-personal email"
  100.                                                    id="personalMailConfirmation"
  101.                                                    placeholder="{{ "account.personalMailConfirmationPlaceholder"|trans|striptags }}"
  102.                                                    name="emailConfirmation"
  103.                                                    value="{{ data.get('emailConfirmation') }}"
  104.                                                    data-form-validation-equal="personalMail"
  105.                                                    data-form-validation-equal-message="{{ "account.personalMailConfirmationInvalidMessage"|trans|striptags }}"
  106.                                                    required="required">
  107.                                         {% endblock %}
  108.                                         {% block component_account_register_personal_mail_confirmation_input_error %}
  109.                                             {% if formViolations.getViolations('/email') is not empty %}
  110.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  111.                                                     violationPath: '/email'
  112.                                                 } %}
  113.                                             {% endif %}
  114.                                             {% if formViolations.getViolations('/emailConfirmation') is not empty %}
  115.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  116.                                                     violationPath: '/emailConfirmation'
  117.                                                 } %}
  118.                                             {% endif %}
  119.                                         {% endblock %}
  120.                                     {% endblock %}
  121.                                 {% endset %}
  122.                                 {% set formGroupPassword %}
  123.                                     {% block component_account_register_personal_password %}
  124.                                         <span class="js-form-field-toggle-guest-mode">
  125.                                             {% block component_account_register_personal_password_label %}
  126.                                                 <label class="form-label"
  127.                                                        for="personalPassword">
  128.                                                     {{ "account.personalPasswordLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  129.                                                 </label>
  130.                                             {% endblock %}
  131.                                             {% block component_account_register_personal_password_input %}
  132.                                                 <input type="password"
  133.                                                        class="form-control{% if formViolations.getViolations('/password') is not empty %} is-invalid{% endif %}"
  134.                                                        autocomplete="new-password"
  135.                                                        id="personalPassword"
  136.                                                        placeholder="{{ "account.personalPasswordPlaceholder"|trans|striptags }}"
  137.                                                        name="password"
  138.                                                        minlength="{{ config('core.loginRegistration.passwordMinLength') }}"
  139.                                                        {% if config('core.loginRegistration.requirePasswordConfirmation') %}
  140.                                                        data-form-validation-equal="newPassword"
  141.                                                        {% endif %}
  142.                                                        {% if config('core.loginRegistration.passwordMinLength') != 0 %}
  143.                                                        data-form-validation-length="{{ config('core.loginRegistration.passwordMinLength') }}"
  144.                                                        data-form-validation-length-message=" {{ "account.personalPasswordDescription"|trans({
  145.                                                            '%minLength%': config('core.loginRegistration.passwordMinLength')
  146.                                                        })|sw_sanitize }}"
  147.                                                        {% endif %}
  148.                                                        required="required">
  149.                                             {% endblock %}
  150.                                             {% block component_account_register_personal_password_description %}
  151.                                                 {% if config('core.loginRegistration.passwordMinLength') != 0 %}
  152.                                                     <small class="form-text js-validation-message"
  153.                                                            data-form-validation-length-text="true">
  154.                                                         {{ "account.personalPasswordDescription"|trans({
  155.                                                             '%minLength%': config('core.loginRegistration.passwordMinLength')
  156.                                                         })|sw_sanitize }}
  157.                                                     </small>
  158.                                                 {% endif %}
  159.                                             {% endblock %}
  160.                                             {% block component_account_register_personal_password_input_error %}
  161.                                                 {% if formViolations.getViolations('/password') is not empty %}
  162.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  163.                                                         violationPath: '/password'
  164.                                                     } %}
  165.                                                 {% endif %}
  166.                                             {% endblock %}
  167.                                         </span>
  168.                                     {% endblock %}
  169.                                 {% endset %}
  170.                                 {% set formGroupPasswordConfirmation %}
  171.                                     {% block component_account_register_personal_password_confirmation %}
  172.                                         <span class="js-form-field-toggle-guest-mode">
  173.                                             {% block component_account_register_personal_password_confirmation_label %}
  174.                                                 <label class="form-label"
  175.                                                        for="personalPasswordConfirmation">
  176.                                                     {{ "account.personalPasswordConfirmationLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  177.                                                 </label>
  178.                                             {% endblock %}
  179.                                             {% block component_account_register_personal_password_confirmation_input %}
  180.                                                 <input type="password"
  181.                                                        class="form-control{% if formViolations.getViolations('/password') is not empty or formViolations.getViolations('/passwordConfirmation') is not empty %} is-invalid{% endif %}"
  182.                                                        autocomplete="new-password"
  183.                                                        id="personalPasswordConfirmation"
  184.                                                        placeholder="{{ "account.personalPasswordConfirmationPlaceholder"|trans|striptags }}"
  185.                                                        name="passwordConfirmation"
  186.                                                        minlength="{{ config('core.loginRegistration.passwordMinLength') }}"
  187.                                                        data-form-validation-equal="newPassword"
  188.                                                        data-form-validation-equal-message="{{ "account.personalPasswordConfirmationInvalidMessage"|trans|striptags }}"
  189.                                                        required="required">
  190.                                             {% endblock %}
  191.                                             {% block component_account_register_personal_password_confirmation_input_error %}
  192.                                                 {% if formViolations.getViolations('/password') is not empty %}
  193.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  194.                                                         violationPath: '/password'
  195.                                                     } %}
  196.                                                 {% endif %}
  197.                                                 {% if formViolations.getViolations('/passwordConfirmation') is not empty %}
  198.                                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  199.                                                         violationPath: '/passwordConfirmation'
  200.                                                     } %}
  201.                                                 {% endif %}
  202.                                             {% endblock %}
  203.                                         </span>
  204.                                     {% endblock %}
  205.                                 {% endset %}
  206.                                 {% block component_account_register_personal_account_fields %}
  207.                                     <div class="{{ formRowClass }}">
  208.                                         <div class="form-group col-sm-6">
  209.                                             {{ formGroupMail }}
  210.                                         </div>
  211.                                         <div class="form-group col-sm-6">
  212.                                             {% if config('core.loginRegistration.requireEmailConfirmation') %}
  213.                                                 {{ formGroupMailConfirmation }}
  214.                                             {% elseif not config('core.loginRegistration.requirePasswordConfirmation') %}
  215.                                                 {{ formGroupPassword }}
  216.                                             {% endif %}
  217.                                         </div>
  218.                                         <div class="form-group col-sm-6">
  219.                                             {% if config('core.loginRegistration.requireEmailConfirmation') or config('core.loginRegistration.requirePasswordConfirmation') %}
  220.                                                 {{ formGroupPassword }}
  221.                                             {% endif %}
  222.                                         </div>
  223.                                         <div class="form-group col-sm-6">
  224.                                             {% if config('core.loginRegistration.requirePasswordConfirmation') %}
  225.                                                 {{ formGroupPasswordConfirmation }}
  226.                                             {% endif %}
  227.                                         </div>
  228.                                     </div>
  229.                                 {% endblock %}
  230.                             {% endblock %}
  231.                         </div>
  232.                     {% endblock %}
  233.                     {% block component_account_register_address %}
  234.                         <div class="register-address">
  235.                             {% block component_account_register_address_fields %}
  236.                                 {% block component_account_register_address_billing %}
  237.                                     <div class="register-billing">
  238.                                         {% block component_account_register_address_billing_header %}
  239.                                             <div class="card-title">
  240.                                                 {{ "account.registerAddressBillingHeader"|trans|sw_sanitize }}
  241.                                             </div>
  242.                                         {% endblock %}
  243.                                         {% block component_account_register_address_billing_fields %}
  244.                                             {% sw_include '@Storefront/storefront/component/address/address-form.html.twig' with {
  245.                                                 'prefix': 'billingAddress',
  246.                                                 'data': data.get('billingAddress'),
  247.                                                 'showNoShippingPostfix': true,
  248.                                             } %}
  249.                                         {% endblock %}
  250.                                     </div>
  251.                                 {% endblock %}
  252.                                 {% block component_account_register_address_different_shipping %}
  253.                                     <div>
  254.                                         {% block component_account_register_address_different_shipping_control %}
  255.                                             <div class="{{ formCheckboxWrapperClass }} register-different-shipping">
  256.                                                 {% block component_account_register_address_different_shipping_input %}
  257.                                                     <input type="checkbox"
  258.                                                            class="{{ formCheckInputClass }} js-different-shipping-checkbox"
  259.                                                            name="differentShippingAddress"
  260.                                                            value="1"
  261.                                                            id="differentShippingAddress"
  262.                                                            {% if data.get('differentShippingAddress') %}checked="checked"{% endif %}
  263.                                                            data-form-field-toggle="true"
  264.                                                            data-form-field-toggle-target=".js-form-field-toggle-shipping-address"
  265.                                                            data-form-field-toggle-value="true"
  266.                                                            data-form-field-toggle-trigger-nested="true">
  267.                                                 {% endblock %}
  268.                                                 {% block component_account_register_address_different_shipping_label %}
  269.                                                     <label class="custom-control-label no-validation"
  270.                                                            for="differentShippingAddress">
  271.                                                         {{ "account.registerDifferentShipping"|trans|sw_sanitize }}
  272.                                                     </label>
  273.                                                 {% endblock %}
  274.                                             </div>
  275.                                         {% endblock %}
  276.                                         {% block component_account_register_address_shipping %}
  277.                                             <div class="register-shipping js-form-field-toggle-shipping-address d-none">
  278.                                                 {% block component_account_register_address_shipping_header %}
  279.                                                     <div class="card-title">
  280.                                                         {{ "account.registerAddressShippingHeader"|trans|sw_sanitize }}
  281.                                                     </div>
  282.                                                 {% endblock %}
  283.                                                 {% block component_account_register_address_shipping_fields %}
  284.                                                     {% block component_account_register_address_shipping_fields_personal %}
  285.                                                         {% sw_include '@Storefront/storefront/component/address/address-personal.html.twig' with {
  286.                                                             'prefix': 'shippingAddress',
  287.                                                             'data': data.get('shippingAddress'),
  288.                                                             'hideCustomerTypeSelect': false,
  289.                                                             'customToggleTarget': true,
  290.                                                             'accountType': data.get('shippingAddress').get('accountType')
  291.                                                         } %}
  292.                                                     {% endblock %}
  293.                                                     {% block component_account_register_address_shipping_fields_company %}
  294.                                                         {% sw_include '@Storefront/storefront/component/address/address-personal-company.html.twig' with {
  295.                                                             'prefix': 'shippingAddress',
  296.                                                             'customToggleTarget': true,
  297.                                                             'address': data.get('shippingAddress')
  298.                                                         } %}
  299.                                                     {% endblock %}
  300.                                                     {% block component_account_register_address_shipping_fields_address %}
  301.                                                         {% sw_include '@Storefront/storefront/component/address/address-form.html.twig' with {
  302.                                                             'prefix': 'shippingAddress',
  303.                                                             'data': data.get('shippingAddress'),
  304.                                                             'showNoShippingPostfix': true,
  305.                                                             'disableNonShippableCountries': true,
  306.                                                         } %}
  307.                                                     {% endblock %}
  308.                                                 {% endblock %}
  309.                                             </div>
  310.                                         {% endblock %}
  311.                                     </div>
  312.                                 {% endblock %}
  313.                             {% endblock %}
  314.                         </div>
  315.                     {% endblock %}
  316.                     {% block component_account_register_captcha %}
  317.                         {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { preCheck: true } %}
  318.                     {% endblock %}
  319.                     {% block component_account_register_privacy %}
  320.                         {% sw_include '@Storefront/storefront/component/privacy-notice.html.twig' %}
  321.                     {% endblock %}
  322.                     {% block component_account_register_required_fields %}
  323.                         <p class="register-required-info">
  324.                             {{ "general.requiredFields"|trans|sw_sanitize }}
  325.                         </p>
  326.                     {% endblock %}
  327.                     {% block component_account_register_submit %}
  328.                         <div class="register-submit">
  329.                             <button type="submit"
  330.                                     class="btn btn-primary btn-lg">
  331.                                 {{ "account.registerSubmit"|trans|sw_sanitize }}
  332.                             </button>
  333.                         </div>
  334.                     {% endblock %}
  335.                 </form>
  336.             {% endblock %}
  337.         </div>
  338.     </div>
  339. {% endblock %}