Skip to content

Commit

Permalink
fix: countries.pl for countries dropdown (#7138)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet authored Jul 26, 2022
1 parent 02553ac commit 77eb795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cgi/i18n/countries.pl → cgi/countries.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
use Encode;
use JSON::PP;

ProductOpener::Display::init();
# This script returns a list of countries in the language of the interface in a JSON format
# it is used to display the dropdown list of countries

ProductOpener::Display::init_request();

my $term = decode utf8 => param('term');

Expand Down
4 changes: 2 additions & 2 deletions html/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let countriesData;
function countries() {
if (!countriesData) {
$.ajax({
url: '/cgi/i18n/countries.pl',
url: '/cgi/countries.pl',
dataType: 'json',
async: false,
success: function (json) {
Expand All @@ -91,7 +91,7 @@ $(function () {
$("#select_country").select2({
allowClear: true,
ajax: {
url: '/cgi/i18n/countries.pl',
url: '/cgi/countries.pl',
dataType: 'json',
processResults: function (data) {
const results = [];
Expand Down

0 comments on commit 77eb795

Please sign in to comment.