* finish task #2885.
This commit is contained in:
@@ -427,6 +427,13 @@ class extension extends control
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
$statusFile = $this->loadModel('upgrade')->checkSafeFile();
|
||||
if($statusFile)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, $statusFile);
|
||||
die($this->display());
|
||||
}
|
||||
|
||||
if($_FILES)
|
||||
{
|
||||
$tmpName = $_FILES['file']['tmp_name'];
|
||||
|
||||
@@ -17,11 +17,21 @@
|
||||
<strong><?php echo $lang->extension->upload;?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($error)):?>
|
||||
<div class='panel panel-body text-left'>
|
||||
<div class='container mw-500px'>
|
||||
<p class='text-danger'><?php echo $error;?></p>
|
||||
</div>
|
||||
<hr>
|
||||
<?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form method='post' enctype='multipart/form-data' style='padding: 5% 20%'>
|
||||
<div class='input-group'>
|
||||
<input type='file' name='file' class='form-control' />
|
||||
<span class='input-group-btn'><?php echo html::submitButton($lang->extension->install);?></span>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,8 @@ table.fileBox td {padding: 0!important}
|
||||
.fileBox .input-control > input[type='file'] {width: 100%; height: 100%; height: 26px; line-height: 26px; border: none; position: relative;}
|
||||
.fileBox td .btn {border-radius: 0; border-left: none}
|
||||
.file-wrapper.form-control {border-right: 0}
|
||||
.file-wrapper.form-control .fileControl {width:100%;}
|
||||
@-moz-document url-prefix(){.file-wrapper.form-control .fileControl {margin-top:-3px;}}
|
||||
</style>
|
||||
<div id='fileform'>
|
||||
<?php
|
||||
|
||||
@@ -311,7 +311,11 @@ fieldset > .content table, fieldset > .article-content table{table-layout: initi
|
||||
.form-condensed .chosen-container-single .chosen-single {padding: 5px 10px}
|
||||
.form-condensed .chosen-container-single .chosen-search:before {top: 10px}
|
||||
|
||||
@-moz-document url-prefix(){.form-condensed textarea.form-control {height: 30px;min-height: 30px;}}
|
||||
@-moz-document url-prefix()
|
||||
{
|
||||
.form-condensed textarea.form-control {height: 30px;min-height: 30px;}
|
||||
.form-control[type='file']{padding:0px;}
|
||||
}
|
||||
|
||||
/* chosen container in col-side */
|
||||
.col-side .chosen-single {max-width: 218px}
|
||||
|
||||
Reference in New Issue
Block a user