[*] IN : removed timezones selection for countries that have only one
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -70,7 +70,7 @@ var default_iso = '<?php echo $this->session->shop_country ?>';
|
||||
</div>
|
||||
|
||||
<!-- Timezone list -->
|
||||
<div class="field clearfix">
|
||||
<div id="timezone_div" class="field clearfix" <?php if (!in_array($this->session->shop_timezone, array('us','ca','au','ru','me','id'))) echo 'style="display:none"'; ?>>
|
||||
<label for="infosTimezone" class="aligned"><?php echo $this->l('Shop timezone:') ?></label>
|
||||
<div class="contentinput">
|
||||
<select name="shop_timezone" id="infosTimezone" class="chosen">
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3)): ?>
|
||||
<iframe scrolling="no" style="height:200px;width:160px;border:none;margin-top:20px"
|
||||
<iframe scrolling="no" style="height:160px;width:160px;border:none;margin-top:20px"
|
||||
src="https://api.prestashop.com/iframe/install.php?step=<?php echo $this->step ?>&lang=<?php echo $this->language->getLanguageIso() ?>&country=<?php echo $this->session->shop_country ?>">
|
||||
<p><?php echo $this->l('Contact us!') ?><br /><?php echo $this->getPhone() ?></p>
|
||||
</iframe>
|
||||
@@ -85,7 +85,6 @@
|
||||
<div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix">
|
||||
<div class="contentTitle">
|
||||
<h1><?php echo $this->l('Installation Assistant') ?></h1>
|
||||
|
||||
<ul id="stepList_1" class="stepList clearfix">
|
||||
<?php foreach ($this->getSteps() as $step): ?>
|
||||
<li <?php if ($this->isStepFinished($step)): ?>class="ok"<?php endif; ?>><?php echo $this->l('menu_'.$this->step) ?></li>
|
||||
|
||||
Reference in New Issue
Block a user