// Context part 5

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7624 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-13 15:24:38 +00:00
parent 39e2b09219
commit e5c68ba9ae
89 changed files with 417 additions and 441 deletions
+5 -5
View File
@@ -1270,7 +1270,7 @@ class AdminImport extends AdminTab
echo '
<fieldset class="width3">
<legend><img src="../img/admin/import.gif" />'.$this->l('Upload').'</legend>
<form action="'.$this->currentIndex.'&token='.$this->token.'" method="POST" enctype="multipart/form-data">
<form action="'.self::$currentIndex.'&token='.$this->token.'" method="POST" enctype="multipart/form-data">
<label class="clear">'.$this->l('Select a file').' </label>
<div class="margin-form">
<input name="file" type="file" /><br />'.$this->l('You can also upload your file by FTP and put it in').' '.realpath(dirname(__FILE__).'/../import/').'.
@@ -1295,7 +1295,7 @@ class AdminImport extends AdminTab
{
echo '
<div class="space">
<form id="preview_import" action="'.$this->currentIndex.'&token='.$this->token.'" method="post" style="display:inline" enctype="multipart/form-data" class="clear" onsubmit="if ($(\'#truncate\').get(0).checked) {if (confirm(\''.$this->l('Are you sure you want to delete', __CLASS__, true, false).'\' + \' \' + $(\'#entity > option:selected\').text().toLowerCase() + \''.$this->l('?', __CLASS__, true, false).'\')){this.submit();} else {return false;}}">
<form id="preview_import" action="'.self::$currentIndex.'&token='.$this->token.'" method="post" style="display:inline" enctype="multipart/form-data" class="clear" onsubmit="if ($(\'#truncate\').get(0).checked) {if (confirm(\''.$this->l('Are you sure you want to delete', __CLASS__, true, false).'\' + \' \' + $(\'#entity > option:selected\').text().toLowerCase() + \''.$this->l('?', __CLASS__, true, false).'\')){this.submit();} else {return false;}}">
<fieldset style="float: left; width: 550px">
<legend><img src="../img/admin/import.gif" />'.$this->l('Import').'</legend>
<label class="clear">'.$this->l('Select which entity to import:').' </label>
@@ -1360,7 +1360,7 @@ class AdminImport extends AdminTab
<script type="text/javascript">
$("select#entity").change( function() {
$("#entitie").html($("#entity > option:selected").text().toLowerCase());
$.getJSON("'.dirname($this->currentIndex).'/ajax.php",
$.getJSON("'.dirname(self::$currentIndex).'/ajax.php",
{
getAvailableFields:1,
entity: $("#entity").val()},
@@ -1511,7 +1511,7 @@ class AdminImport extends AdminTab
$res[] = '\''.$elem.'\'';
echo '
<form action="'.$this->currentIndex.'&token='.$this->token.'" method="post" id="import_form" name="import_form">
<form action="'.self::$currentIndex.'&token='.$this->token.'" method="post" id="import_form" name="import_form">
'.$this->l('Skip').' <input type="text" size="2" name="skip" value="0" /> '.$this->l('lines').'.
<input type="hidden" name="csv" value="'.Tools::getValue('csv').'" />
<input type="hidden" name="convert" value="'.Tools::getValue('convert').'" />
@@ -1659,7 +1659,7 @@ class AdminImport extends AdminTab
elseif (!file_exists($_FILES['file']['tmp_name']) OR !@move_uploaded_file($_FILES['file']['tmp_name'], dirname(__FILE__).'/../import/'.$_FILES['file']['name'].'.'.date('Ymdhis')))
$this->_errors[] = $this->l('an error occurred while uploading and copying file');
else
Tools::redirectAdmin($this->currentIndex.'&token='.Tools::getValue('token').'&conf=18');
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18');
}
elseif (Tools::isSubmit('submitImportFile'))
$this->displayCSV();