From e15a53b7075a4a783f54e97879e06f99469014f6 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Mon, 8 Feb 2021 15:52:01 +0300 Subject: [PATCH] #3266 Store error --- .../resources/js/filterLocation.js | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/addons/default/visiosoft/location-module/resources/js/filterLocation.js b/addons/default/visiosoft/location-module/resources/js/filterLocation.js index f6a4c1c24..c07344d60 100644 --- a/addons/default/visiosoft/location-module/resources/js/filterLocation.js +++ b/addons/default/visiosoft/location-module/resources/js/filterLocation.js @@ -13,7 +13,9 @@ $('.filter-country-btn').on('click', function () { countries = callback; resetValue('country', true, false) $.each(countries, function (index, value) { - $('.filter-location-modal .countries').append(item('country', value.id, value.name, value.abv.toLowerCase())); + $('.filter-location-modal .countries').append( + item('country', value.id, value.name, value.abv ? value.abv.toLowerCase() : '') + ); }); if (countries == "") $('.filter-location-modal .countries').html(null_msg); @@ -245,22 +247,24 @@ function locationCrud(params, url, type, beforeSend, callback) { function item(field_name, id, value, abv = '') { var selected = defaultCountry === id ? "checked" : ""; if (field_name === 'country') { - return '
  • \n' + - ' \n' + - '
  • '; + return ` +
  • + +
  • + `; } else { - return '
  • \n' + - ' \n' + - '
  • '; + return ` +
  • + +
  • + `; } }