// Fix translation pack fetching in AdminLanguages form

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13938 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-03-07 16:35:29 +00:00
parent 93a7ded19e
commit c899a277cc
4 changed files with 16 additions and 8 deletions
@@ -25,10 +25,14 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="start_field_block"}
<div class="margin-form">
{block name="input_block"}
{if $input.type == 'special'}
<p id="{$input.name}"><img src="../img/admin/{$input.img}" alt="" /> {$input.text}</p>
<div id="#resultCheckLangPack">
<p id="lang_pack_loading" style="display:none"><img src="../img/admin/{$input.img}" alt="" /> {$input.text}</p>
<p id="lang_pack_msg" style="display:none"></p>
</div>
{else}
{$smarty.block.parent}
{/if}
{/block}
@@ -122,7 +122,7 @@ class AdminLanguagesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Name:'),
'name' => 'name',
'size' => 8,
'size' => 32,
'maxlength' => 32,
'required' => true
),
@@ -131,7 +131,7 @@ class AdminLanguagesControllerCore extends AdminController
'label' => $this->l('ISO code:'),
'name' => 'iso_code',
'required' => true,
'size' => 4,
'size' => 2,
'maxlength' => 2,
'desc' => $this->l('2-letter ISO code (e.g., fr, en, de)')
),
@@ -140,7 +140,7 @@ class AdminLanguagesControllerCore extends AdminController
'label' => $this->l('Language code:'),
'name' => 'language_code',
'required' => true,
'size' => 10,
'size' => 2,
'maxlength' => 5,
'desc' => $this->l('Full language code (e.g., en-us, pt-br)')
),
+1 -1
View File
@@ -983,7 +983,7 @@ p.fail{
font-weight:bold;
color:red;
}
#resultCheckLangPack{
#lang_pack_msg {
border: 1px solid #DFD5C3;
padding:10px;
margin-bottom:10px;
+5 -1
View File
@@ -27,6 +27,8 @@
function checkLangPack(token){
if ($('#iso_code').val().length == 2)
{
$('#lang_pack_loading').show();
$('#lang_pack_msg').hide();
doAdminAjax(
{
controller:'AdminLanguages',
@@ -38,6 +40,7 @@ function checkLangPack(token){
},
function(ret)
{
$('#lang_pack_loading').hide();
ret = $.parseJSON(ret);
if( ret.status == 'ok')
{
@@ -46,7 +49,8 @@ function checkLangPack(token){
+'<br />' + langPackVersion + ' ' + content['version']
+ ' <a href="http://www.prestashop.com/download/lang_packs/gzip/' + content['version'] + '/'
+ $('#iso_code').val()+'.gzip" target="_blank" class="link">'+download+'</a><br />' + langPackInfo;
showSuccessMessage(message);
$('#lang_pack_msg').html(message);
$('#lang_pack_msg').show();
}
else
showErrorMessage(ret.error);