vendor/shopware/storefront/Resources/views/storefront/component/address/address-personal-company.html.twig line 1

Open in your IDE?
  1. {% block component_account_register_company_fields %}
  2.     {% set accountTypeRequired = config('core.loginRegistration.showAccountTypeSelection') %}
  3.     {% if accountTypeRequired or prefix == "address" or prefix == "shippingAddress" or hasSelectedBusiness %}
  4.         <div class="{% if hasSelectedBusiness %}address-contact-type-company{% elseif prefix == "address" %}js-field-toggle-contact-type-company d-block{% else %}js-field-toggle-contact-type-company{% if customToggleTarget %}-{{ prefix }}{% endif %} d-none{% endif %}">
  5.             {% block component_address_form_company_fields %}
  6.                 <div class="form-row">
  7.                     {% block component_address_form_company_name %}
  8.                         <div class="form-group col-12">
  9.                             {% if formViolations.getViolations("/company") is not empty %}
  10.                                 {% set violationPath = "/company" %}
  11.                             {% elseif formViolations.getViolations("/#{prefix}/company") is not empty %}
  12.                                 {% set violationPath = "/#{prefix}/company" %}
  13.                             {% endif %}
  14.                             {% block component_address_form_company_name_label %}
  15.                                 <label class="form-label"
  16.                                        for="{{ idPrefix ~ prefix }}company">
  17.                                     {{ "address.companyNameLabel"|trans|sw_sanitize }}{% if accountTypeRequired %}{{ "general.required"|trans|sw_sanitize }}{% endif %}
  18.                                 </label>
  19.                             {% endblock %}
  20.                             {% block component_address_form_company_name_input %}
  21.                                 <input type="text"
  22.                                        class="form-control{% if violationPath %} is-invalid{% endif %}"
  23.                                        id="{{ idPrefix ~ prefix }}company"
  24.                                        placeholder="{{ "address.companyNamePlaceholder"|trans|striptags }}"
  25.                                        name="{{ prefix }}[company]"
  26.                                        value="{{ address.get('company') }}"
  27.                                        {% if accountTypeRequired %}required="required"{% endif %}>
  28.                             {% endblock %}
  29.                             {% block component_address_form_company_name_input_error %}
  30.                                 {% if violationPath %}
  31.                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  32.                                 {% endif %}
  33.                             {% endblock %}
  34.                         </div>
  35.                     {% endblock %}
  36.                 </div>
  37.                 <div class="form-row">
  38.                     {% block component_address_form_company_department %}
  39.                         <div class="form-group col-md-6">
  40.                             {% if formViolations.getViolations("/department") is not empty %}
  41.                                 {% set violationPath = "/department" %}
  42.                             {% elseif formViolations.getViolations("/#{prefix}/department") is not empty %}
  43.                                 {% set violationPath = "/#{prefix}/department" %}
  44.                             {% endif %}
  45.                             {% block component_address_form_company_department_label %}
  46.                                 <label class="form-label"
  47.                                        for="{{ idPrefix ~ prefix }}department">
  48.                                     {{ "address.companyDepartmentLabel"|trans|sw_sanitize }}
  49.                                 </label>
  50.                             {% endblock %}
  51.                             {% block component_address_form_company_department_input %}
  52.                                 <input type="text"
  53.                                        class="form-control{% if violationPath %} is-invalid{% endif %}"
  54.                                        id="{{ idPrefix ~ prefix }}department"
  55.                                        placeholder="{{ "address.companyDepartmentPlaceholder"|trans|striptags }}"
  56.                                        name="{{ prefix }}[department]"
  57.                                        value="{{ address.get('department') }}">
  58.                             {% endblock %}
  59.                             {% block component_address_form_company_department_input_error %}
  60.                                 {% if violationPath %}
  61.                                     {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  62.                                 {% endif %}
  63.                             {% endblock %}
  64.                         </div>
  65.                     {% endblock %}
  66.                     {% block component_address_form_company_vatId %}
  67.                         {% if prefix != 'shippingAddress' %}
  68.                             <div class="form-group col-md-6">
  69.                                 {% sw_include '@Storefront/storefront/component/address/address-personal-vat-id.html.twig' with {
  70.                                     'vatIds': data.get('vatIds')
  71.                                 } %}
  72.                             </div>
  73.                         {% endif %}
  74.                     {% endblock %}
  75.                 </div>
  76.             {% endblock %}
  77.         </div>
  78.     {% endif %}
  79. {% endblock %}