[*] IN : removed timezones selection for countries that have only one

This commit is contained in:
Damien Metzger committed 2013-06-24 14:41:59 +02:00
1 parent 24d5be445b
commit ec426f170f
3 files changed
+18 -6

No files matched your search

+16 -3
View File
@@ -14,15 +14,28 @@ $(document).ready(function()
data: 'timezoneByIso=true&iso='+iso, data: 'timezoneByIso=true&iso='+iso,
dataType: 'json', dataType: 'json',
cache: true, cache: true,
success: function(json) success: function(json) {
{ if (json.success) {
if (json.success)
$('#infosTimezone').val(json.message).trigger("liszt:updated"); $('#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 * Upload a new logo
*/ */
+1 -1
View File
@@ -70,7 +70,7 @@ var default_iso = '<?php echo $this->session->shop_country ?>';
</div> </div>
<!-- Timezone list --> <!-- 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> <label for="infosTimezone" class="aligned"><?php echo $this->l('Shop timezone:') ?></label>
<div class="contentinput"> <div class="contentinput">
<select name="shop_timezone" id="infosTimezone" class="chosen"> <select name="shop_timezone" id="infosTimezone" class="chosen">
+1 -2
View File
@@ -72,7 +72,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</ol> </ol>
<?php if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3)): ?> <?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 ?>"> 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> <p><?php echo $this->l('Contact us!') ?><br /><?php echo $this->getPhone() ?></p>
</iframe> </iframe>
@@ -85,7 +85,6 @@
<div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix"> <div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix">
<div class="contentTitle"> <div class="contentTitle">
<h1><?php echo $this->l('Installation Assistant') ?></h1> <h1><?php echo $this->l('Installation Assistant') ?></h1>
<ul id="stepList_1" class="stepList clearfix"> <ul id="stepList_1" class="stepList clearfix">
<?php foreach ($this->getSteps() as $step): ?> <?php foreach ($this->getSteps() as $step): ?>
<li <?php if ($this->isStepFinished($step)): ?>class="ok"<?php endif; ?>><?php echo $this->l('menu_'.$this->step) ?></li> <li <?php if ($this->isStepFinished($step)): ?>class="ok"<?php endif; ?>><?php echo $this->l('menu_'.$this->step) ?></li>