custom/plugins/ApiSee/src/Resources/views/storefront/component/address/address-personal.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/address/address-personal.html.twig' %}
  2.     {% block component_address_personal_account_type %}
  3.         {% if onlyCompanyRegistration or (config('core.loginRegistration.showAccountTypeSelection') and not hideCustomerTypeSelect) %}
  4.             <div class="{{ formRowClass }}">
  5.                 <div class="form-group col-md-3 col-sm-6 contact-type">
  6.                     {% block component_address_personal_account_type_label %}
  7.                         <label class="form-label"
  8.                                for="{{ idPrefix ~ prefix }}accountType">
  9.                             {{ "account.personalTypeLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  10.                         </label>
  11.                     {% endblock %}
  12.                     {% block component_address_personal_account_type_select %}
  13.                             {% if onlyCompanyRegistration or config('core.loginRegistration.showAccountTypeSelection') %}
  14.                                 <select name="{% if prefix %}{{ prefix }}[accountType]{% else %}accountType{% endif %}"
  15.                                     id="{{ idPrefix ~ prefix }}accountType"
  16.                                     {% if onlyCompanyRegistration %}disabled{% endif %}
  17.                                     required="required"
  18.                                     class="{{ formSelectClass }} contact-select"
  19.                                     data-form-field-toggle="true"
  20.                                     data-form-field-toggle-target=".js-field-toggle-contact-type-company{% if customToggleTarget %}-{{ prefix }}{% endif %}"
  21.                                     data-form-field-toggle-value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') }}"
  22.                                     data-form-field-toggle-scope="{% if scope == 'parent' %}parent{% else %}all{% endif %}"
  23.                                     {% if scope == 'parent' %}data-form-field-toggle-parent-selector={{ parentSelector }}{% endif %}
  24.                                 >
  25.                             {% endif %}
  26.                             {% set isCompany = false %}
  27.                             {% if page.address.company or data.company is not empty %}
  28.                                 {% set isCompany  = true %}
  29.                             {% endif %}
  30.                             {% if onlyCompanyRegistration or (accountType and accountType == constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS')) %}
  31.                                 {% set isCompany  = true %}
  32.                             {% endif %}
  33.                             {% set isLoginPage = false %}
  34.                             {% if activeRoute == 'frontend.account.login.page' %}
  35.                                 {% set isLoginPage = true %}
  36.                             {% endif %}
  37.                             {% if isLoginPage %}
  38.                                 <option disabled="disabled"
  39.                                         
  40.                                         value="">
  41.                                     {{ "account.personalTypeLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  42.                                 </option>
  43.                             {% endif %}
  44.                             {% if not onlyCompanyRegistration %}
  45.                                 <option value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_PRIVATE') }}"
  46.                                     {% if isCompany == false and isLoginPage == false %} selected="selected"{% endif %}>
  47.                                     {{ "account.personalTypePrivate"|trans|sw_sanitize }}
  48.                                 </option>
  49.                             {% endif %}
  50.                             <option selected="selected" value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') }}"
  51.                                 {% if isCompany == true and isLoginPage == false %} selected="selected"{% endif %}>
  52.                                 {{ "account.personalTypeBusiness"|trans|sw_sanitize }}
  53.                             </option>
  54.                         </select>
  55.                         {% if onlyCompanyRegistration %}<input type="hidden" name="accountType" value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') }}">{% endif %}
  56.                     {% endblock %}
  57.                     {% block component_address_personal_account_type_error %}
  58.                     {% endblock %}
  59.                 </div>
  60.             </div>
  61.         {% elseif not hideCustomerTypeSelect %}
  62.             <input type="hidden" name="accountType">
  63.         {% endif %}
  64.     {% endblock %}