custom/plugins/PremsAutoComplete6/src/Resources/views/storefront/component/prems_auto_complete/js.html.twig line 1

Open in your IDE?
  1. {% set premsAutoComplete = page.extensions.premsAutoComplete %}
  2. <script type="text/javascript">
  3.     var premsAutoCompleteGoogleApiKey = "{{ premsAutoComplete.googleApiKey }}",
  4.         premsAutoCompleteDisableButtonOnError = "{{ premsAutoComplete.disableButtonOnError }}",
  5.         premsAutoCompleteLanguage = "{{ premsAutoComplete.language }}",
  6.         premsAutoCompleteNumberSuggestions = "{{ premsAutoComplete.numberSuggestions }}",
  7.         premsAutoCompleteRepositionZipStreet = "{{ premsAutoComplete.repositionZipStreet }}",
  8.         premsAutoCompleteFirstLetterUppercase = "{{ premsAutoComplete.firstLetterUppercase }}",
  9.         premsAutoCompleteStreetNoUppercaseChange = "{{ premsAutoComplete.streetNoUppercaseChange }}",
  10.         premsAutoCompleteCityNoUppercaseChange = "{{ premsAutoComplete.cityNoUppercaseChange }}",
  11.         premsAutoCompleteValidateStreetNumber = "{{ premsAutoComplete.validateStreetNumber }}",
  12.         premsAutoCompleteValidateStreetNumberMinLength = {{ premsAutoComplete.validateStreetNumberMinLength }},
  13.         premsAutoCompleteEverytimeSetZipCityCountry = "{{ premsAutoComplete.everytimeSetZipCityCountry }}",
  14.         premsAutoCompleteCityPrediction = "{{ premsAutoComplete.cityPrediction }}",
  15.         premsAutoCompleteStreetNumberErrorMsg = "{{ 'prems-auto-complete.error.streetNumber'|trans }}",
  16.         premsAutoCompleteStreetErrorMsg = "{{ 'prems-auto-complete.error.street'|trans }}",
  17.         premsAutoCompleteStreetOkErrorMsg = "{{ 'prems-auto-complete.error.streetOk'|trans }}",
  18.         premsAutoCompleteShowStreetOkLink = "{{ premsAutoComplete.showStreetOkLink }}",
  19.         premsAutoCompleteZipErrorMsg = "{{ 'prems-auto-complete.error.zip'|trans }}",
  20.         premsAutoCompleteCityErrorMsg = "{{ 'prems-auto-complete.error.city'|trans }}",
  21.         premsAutoCompletePhoneValidationRegex = {{ premsAutoComplete.phoneValidationRegex }},
  22.         premsAutoCompleteValidatePhone = "{{ premsAutoComplete.validatePhone }}",
  23.         premsAutoCompleteValidateAddressExistence = "{{ premsAutoComplete.validateAddressExistence }}",
  24.         premsAutoCompleteShowPasswordStrength = "{{ premsAutoComplete.showPasswordStrength }}",
  25.         premsAutoCompletePhoneNumberErrorMsg = "{{ 'prems-auto-complete.error.phone'|trans }}",
  26.         premsAutoCompleteWidget = "{{ path('frontend.PremsAutoComplete.validateAddressExistence') }}";
  27.     {% if premsAutoComplete.consentGoogleAllowed %}
  28.         var premsAutoCompleteConsentGoogleAllowed = 1;
  29.     {% else %}
  30.         var premsAutoCompleteConsentGoogleAllowed = 0;
  31.     {% endif %}
  32.     {% if config('PremsAutoComplete6.config.restrictValidationToCountries') %}
  33.         var premsAutoCompleteRestrictValidationToCountries = {{ config('PremsAutoComplete6.config.restrictValidationToCountries')|json_encode|raw }};
  34.     {% else %}
  35.         var premsAutoCompleteRestrictValidationToCountries = "";
  36.     {% endif %}
  37. </script>
  38. {% if premsAutoComplete.consentGoogleAllowed %}
  39. <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ premsAutoComplete.googleApiKey }}&language={{ premsAutoComplete.language }}&libraries=places"></script>
  40. {% endif %}