templates/security/btob/_sign_up_btob.html.twig line 1

Open in your IDE?
  1. {% extends 'front/base_front.html.twig' %}
  2. {% block title %} {{ 'Pages.SignUp.Buttons.SingUpBTOB'|trans({} , 'messages_front') }} {% endblock %}
  3. {% block container %}
  4.     <style>
  5.         .prefix {
  6.             margin-top: 40px;
  7.         }
  8.     </style>
  9.     <body class="authentication-bg">
  10.     <section id="common_author_area" class="section_padding">
  11.         <div class="container">
  12.             <div class="row">
  13.                 <div class="col-lg-8 offset-lg-2">
  14.                     <div class="common_author_boxed">
  15.                         <div class="common_author_heading">
  16.                             <h3>{{ 'Pages.SignUp.Messages.Subscription'|trans({}, 'messages_front') }}</h3>
  17.                         </div>
  18.                         <div class="common_author_form">
  19.                             {{ form_start(form, {attr: {'novalidate': 'novalidate'}}) }}
  20.                             <div class="row">
  21.                                 <div class="col-md-12">
  22.                                     {{ form_row(form.name) }}
  23.                                 </div>
  24.                                 <div class="col-md-6">
  25.                                     {{ form_row(form.email) }}
  26.                                 </div>
  27.                                 <div class="col-md-6">
  28.                                     {{ form_row(form.phone) }}
  29.                                 </div>
  30. {#                                <div class="col-md-6">#}
  31. {#                                    <div class="row">#}
  32. {#                                        <div class="col-md-3 prefix text-end">#}
  33. {#                                            <span class="phone-prefix"></span>#}
  34. {#                                        </div>#}
  35. {#                                    </div>#}
  36. {#                                </div>#}
  37.                                 <div class="col-md-6">
  38.                                     {{ form_row(form.country,{'attr': {'class': 'form-control'}}) }}
  39.                                 </div>
  40.                                 <div class="col-md-6">
  41.                                     {{ form_row(form.city,{'attr': {'class': 'form-control'}}) }}
  42.                                 </div>
  43.                                 <div class="col-md-12">
  44.                                     {{ form_row(form.address) }}
  45.                                 </div>
  46.                                 <div class="col-md-12 text-center">
  47.                                     <button class="btn btn_theme btn_md">{{ 'Pages.SignUp.Buttons.SingUpBTOB'|trans({} , 'messages_front') }}</button>
  48.                                 </div>
  49.                             </div>
  50.                             {{ form_end(form) }}
  51.                         </div>
  52.                         <div class="text-center my-3">
  53.                             <a href="{{ path('app_login' ,{ type: 'btob'}) }}"
  54.                                class="text-enter"> {{ 'Pages.SignUp.Messages.HaveAccount'|trans({}, 'messages_front') }} </a>
  55.                         </div>
  56.                     </div>
  57.                 </div>
  58.             </div>
  59.         </div>
  60.     </section>
  61.     <script>
  62.         document.addEventListener('DOMContentLoaded', function () {
  63.             var countryField = document.getElementById('{{ form.country.vars.id }}');
  64.             countryField.addEventListener('change', function (e) {
  65.                 const selectedValue = this.value;
  66.                 if (selectedValue === "") {
  67.                     return;
  68.                 }
  69.                 let url = "{{ (path('app_front_country_cities', {'id': 'country_id'})) }}";
  70.                 url = url.replace("country_id", selectedValue);
  71.                 $.ajax({
  72.                     url: url,
  73.                     method: 'GET',
  74.                     dataType: 'JSON',
  75.                     success: function (data) {
  76.                         var dropdown = $('#business_subscription_city');
  77.                         dropdown.empty(); // Clear existing options
  78.                         dropdown.append('<option value="">{{ "Entities.Customer.FieldsValues.City"|trans }}</option>');
  79.                         data.forEach(function (item) {
  80.                             dropdown.append('<option value="' + item.value + '">' + item.text + '</option>');
  81.                         });
  82.                     },
  83.                     error: function (error) {
  84.                         console.error('Error fetching data:', error);
  85.                     }
  86.                 });
  87.             });
  88.         });
  89.     </script>
  90.     </body>
  91. {% endblock %}