diff --git a/install-dev/theme/js/configure.js b/install-dev/theme/js/configure.js index 0232e2a1e..98a647702 100644 --- a/install-dev/theme/js/configure.js +++ b/install-dev/theme/js/configure.js @@ -14,15 +14,28 @@ $(document).ready(function() data: 'timezoneByIso=true&iso='+iso, dataType: 'json', cache: true, - success: function(json) - { - if (json.success) + success: function(json) { + if (json.success) { $('#infosTimezone').val(json.message).trigger("liszt:updated"); + if (in_array(iso, ['us','ca','ru','me','au','id'])) + $('#timezone_div').show(); + else + $('#timezone_div').hide(); + } } }); }); }); +function in_array(needle, haystack) { + var length = haystack.length; + for (var i = 0; i < length; i++) { + if (haystack[i] == needle) + return true; + } + return false; +} + /** * Upload a new logo */ diff --git a/install-dev/theme/views/configure.phtml b/install-dev/theme/views/configure.phtml index 0861bd78c..5b1c7b98a 100644 --- a/install-dev/theme/views/configure.phtml +++ b/install-dev/theme/views/configure.phtml @@ -70,7 +70,7 @@ var default_iso = 'session->shop_country ?>'; -
+
session->shop_timezone, array('us','ca','au','ru','me','id'))) echo 'style="display:none"'; ?>>