templates/bundles/BitBagSyliusB2BPlugin/Shop/Register/Organization/_form.html.twig line 1

Open in your IDE?
  1. {{ form_errors(form) }}
  2. <div class="ui two column stackable grid">
  3.     <div class="column">
  4.         <h4 class="ui dividing header">{{ 'app.ui.form.contact_data'|trans }}</h4>
  5.         <div class="two fields">
  6.             {{ form_row(form.firstName, sylius_test_form_attribute('first-name')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.first_name'|trans}})) }}
  7.             {{ form_row(form.lastName, sylius_test_form_attribute('last-name')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.last_name'|trans}})) }}
  8.         </div>
  9.         {{ form_row(form.email, sylius_test_form_attribute('email')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.email'|trans}})) }}
  10.         {{ form_row(form.phoneNumber, sylius_test_form_attribute('phone-number')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.phone_number'|trans}})) }}
  11.         <h4 class="ui dividing header form-subheader" style="margin-top:43px">{{ 'sylius.ui.account_credentials'|trans }}</h4>
  12.         <div class="two fields">
  13.             {{ form_row(form.user.plainPassword.first, sylius_test_form_attribute('password-first')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.password'|trans}})) }}
  14.             {{ form_row(form.user.plainPassword.second, sylius_test_form_attribute('password-second')|sylius_merge_recursive({'label': 'app.ui.form.password_verification'|trans, 'attr': {'placeholder': 'app.ui.form.placeholders.password'|trans}})) }}
  15.         </div>
  16.         <span style="display:none">{{ form_row(form.organization.billingData.company, sylius_test_form_attribute('organization-billing-data-company')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.company'|trans}})) }}</span>
  17.     </div>
  18.     <div class="column">
  19.         <h4 class="ui dividing header">{{ 'app.ui.form.company_organisation_data'|trans }}</h4>
  20.         {% if type == 'customer' %}<div style="display:none">{% endif %}
  21.             {{ form_row(form.organization.email, sylius_test_form_attribute('organization-email')|sylius_merge_recursive({'label': 'app.ui.form.email_for_leads'|trans, 'attr': {'placeholder': 'app.ui.form.placeholders.email_for_leads'|trans}})) }}
  22.         {% if type == 'customer' %}</div>{% endif %}
  23.         {{ form_row(form.organization.name, sylius_test_form_attribute('organization-name')|sylius_merge_recursive({'label': 'app.ui.form.legal_name_of_company'|trans, 'attr': {'placeholder': 'app.ui.form.placeholders.company'|trans}})) }}
  24.         {{ form_row(form.organization.billingData.street, sylius_test_form_attribute('organization-billing-data-street')|sylius_merge_recursive({'label': 'app.ui.form.registered_address'|trans, 'attr': {'placeholder': 'app.ui.form.placeholders.registered_address'|trans}})) }}
  25.         <div class="two fields">
  26.         {{ form_row(form.organization.billingData.postcode, sylius_test_form_attribute('organization-billing-data-postcode')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.postcode'|trans}})) }}
  27.         {{ form_row(form.organization.billingData.city, sylius_test_form_attribute('organization-billing-data-city')|sylius_merge_recursive({'attr': {'placeholder': 'app.ui.form.placeholders.city'|trans}})) }}
  28.         </div>
  29.         {{ form_row(form.organization.billingData.country, sylius_test_form_attribute('organization-billing-data-country')) }}
  30.         {{ form_row(form.organization.billingData.taxId, sylius_test_form_attribute('organization-billing-data-tax-id')|sylius_merge_recursive({'label': 'app.ui.form.vat_id_number'|trans, 'label_html': true, 'attr': {'placeholder': 'app.ui.form.placeholders.vat_id'|trans}})) }}
  31.         {% include('Context/Common/ReCaptcha/_field.html.twig') %}
  32.         <div class="field">
  33.             <div class="ui toggle checkbox">
  34.                 <input type="checkbox" id="terms_and_conditions" required>
  35.                 <label for="terms_and_conditions" class="checkbox-label">
  36.                     {% if type == 'customer' %}
  37.                         {{ 'app.ui.form.terms_of_service_label'|trans({'%terms_link%': hyf_get_url_for_code_with_suffix('general_terms', 'legal'), '%privacy_link%': hyf_get_url_for_code_with_suffix('privacy_policy', 'legal')})|raw }}
  38.                     {% else %}
  39.                         {{ 'app.ui.form.vendor_terms_of_service_label'|trans({'%terms_link%': hyf_get_url_for_code_with_suffix('vendor_terms', 'legal'), '%privacy_link%': hyf_get_url_for_code_with_suffix('privacy_policy', 'legal')})|raw }}
  40.                     {% endif %}
  41.                 </label>
  42.             </div>
  43.         </div>
  44.         <div class="field terms-field">
  45.             <label class="recaptcha-label">
  46.                 {{ 'app.ui.newsletter_page.this_site_is_protected'|trans|raw }}
  47.             </label>
  48.         </div>
  49.     </div>
  50. </div>
  51. <script>
  52. {% if type == 'customer' %}
  53.     const buyerCompany = document.getElementById('bitbag_sylius_organization_plugin_organization_registration_organization_billingData_company');
  54.     const buyerOrganization = document.getElementById('bitbag_sylius_organization_plugin_organization_registration_organization_name');
  55.     const buyerLeadsEmail = document.getElementById('bitbag_sylius_organization_plugin_organization_registration_organization_email');
  56.     const buyerEmail = document.getElementById('bitbag_sylius_organization_plugin_organization_registration_email');
  57.     buyerOrganization.addEventListener('blur', populateBuyer);
  58.     buyerOrganization.addEventListener('change', populateBuyer);
  59.     function populateBuyer(e) {
  60.         buyerCompany.value = e.target.value;
  61.     }
  62.     buyerEmail.addEventListener('blur', populateBuyerEmail);
  63.     buyerEmail.addEventListener('change', populateBuyerEmail);
  64.     function populateBuyerEmail(e) {
  65.         buyerLeadsEmail.value = e.target.value;
  66.     }
  67. {% else %}
  68.     var vendorCompany = document.getElementById('bitbag_sylius_organization_plugin_organization_vendor_registration_organization_billingData_company');
  69.     var vendorOrganization = document.getElementById('bitbag_sylius_organization_plugin_organization_vendor_registration_organization_name');
  70.     vendorOrganization.addEventListener('blur', populateVendor);
  71.     vendorOrganization.addEventListener('change', populateVendor);
  72.     function populateVendor(e) {
  73.         vendorCompany.value = e.target.value;
  74.     }
  75. {% endif %}
  76. </script>