Some cleanup and minor fixes
authorAlexander Ebert <ebert@woltlab.com>
Sat, 24 Oct 2015 22:44:16 +0000 (00:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 24 Oct 2015 22:44:16 +0000 (00:44 +0200)
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/acp/templates/packageStartInstall.tpl
wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php
wcfsetup/install/files/style/ui/tabMenu.scss

index 70bfbeedc0b63c9bf632bb3fa1ccb63b597a8c23..aa42fab75259604a9ccaa7fed6b84a1ceebeb2e6 100644 (file)
@@ -7,7 +7,7 @@
        <title>{if $pageTitle|isset}{@$pageTitle|language} - {/if}{lang}wcf.global.acp{/lang}{if PACKAGE_ID} - {PAGE_TITLE|language}{/if}</title>
        
        <!-- Stylesheets -->
-       <!--<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>-->
+       <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>
        {@$__wcf->getStyleHandler()->getStylesheet(true)}
        <link href="{@$__wcf->getPath()}acp/style/acpMenu.css" type="text/css" rel="stylesheet">
        {event name='stylesheets'}
index 9581d909d38ba506bf80ce4b8541f31610201ffc..1d676871e1f5cdff50a32422bb25bbb671296001 100644 (file)
@@ -49,8 +49,8 @@
        </nav>
        
        <div id="packageSearch" class="container containerPadding tabMenuContent">
-               <fieldset>
-                       <legend>{lang}wcf.acp.package.search.conditions{/lang}</legend>
+               <section>
+                       <h1>{lang}wcf.acp.package.search.conditions{/lang}</h1>
                        
                        <dl>
                                <dt><label for="packageName">{lang}wcf.acp.package.search.packageName{/lang}</label></dt>
@@ -67,7 +67,7 @@
                                        <small>{lang}wcf.acp.package.search.package.description{/lang}</small>
                                </dd>
                        </dl>
-               </fieldset>
+               </section>
                
                <div class="formSubmit">
                        <button class="jsButtonPackageSearch">{lang}wcf.global.button.submit{/lang}</button>
@@ -84,8 +84,8 @@
        
        <div id="upload" class="container containerPadding tabMenuContent">
                <form method="post" action="{link controller='PackageStartInstall'}{/link}" enctype="multipart/form-data">
-                       <fieldset>
-                               <legend>{lang}wcf.acp.package.source{/lang}</legend>
+                       <section>
+                               <h1>{lang}wcf.acp.package.source{/lang}</h1>
                                
                                <dl{if $errorField == 'uploadPackage'} class="formError"{/if}>
                                        <dt><label for="uploadPackage">{lang}wcf.acp.package.source.upload{/lang}</label></dt>
                                                <small>{lang}wcf.acp.package.source.upload.description{/lang}</small>
                                        </dd>
                                </dl>
-                               
-                               <dl{if $errorField == 'downloadPackage'} class="formError"{/if}>
-                                       <dt><label for="downloadPackage">{lang}wcf.acp.package.source.download{/lang}</label></dt>
-                                       <dd>
-                                               <input type="text" id="downloadPackage" name="downloadPackage" value="" class="long" />
-                                               {if $errorField == 'downloadPackage'}
-                                                       <small class="innerError">
-                                                               {lang}wcf.acp.package.error.{@$errorType}{/lang}
-                                                       </small>
-                                               {/if}
-                                               <small>{lang}wcf.acp.package.source.download.description{/lang}</small>
-                                       </dd>
-                               </dl>
-                               
-                               {event name='sourceFields'}
-                       </fieldset>
-                       
-                       {event name='fieldsets'}
+                       </section>
                        
                        <div class="formSubmit">
                                <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
index ccb620d6ac609d95cdd7125ce5dc1dee57013c05..b7b8f2e546ec6f01b7449f9918fa1cc4af8f0128 100755 (executable)
@@ -37,12 +37,6 @@ class PackageStartInstallForm extends AbstractForm {
         */
        public $package = null;
        
-       /**
-        * url to the package to download
-        * @var string
-        */
-       public $downloadPackage = '';
-       
        /**
         * data of the uploaded package
         * @var array<string>
@@ -86,7 +80,6 @@ class PackageStartInstallForm extends AbstractForm {
                parent::readFormParameters();
                
                if (!$this->stylePackageImportLocation) {
-                       if (isset($_POST['downloadPackage'])) $this->downloadPackage = StringUtil::trim($_POST['downloadPackage']);
                        if (isset($_FILES['uploadPackage'])) $this->uploadPackage = $_FILES['uploadPackage'];
                }
        }
@@ -110,9 +103,6 @@ class PackageStartInstallForm extends AbstractForm {
                else if (!empty($this->uploadPackage['name'])) {
                        $this->validateUploadPackage();
                }
-               else if (!empty($this->downloadPackage)) {
-                       $this->validateDownloadPackage();
-               }
                else {
                        throw new UserInputException('uploadPackage');
                }
@@ -156,46 +146,6 @@ class PackageStartInstallForm extends AbstractForm {
                $this->package = PackageValidationManager::getInstance()->getPackageValidationArchive()->getPackage();
        }
        
-       /**
-        * Validates the download package input.
-        */
-       protected function validateDownloadPackage() {
-               $this->activeTabMenuItem = 'upload';
-               
-               if (FileUtil::isURL($this->downloadPackage)) {
-                       // download package
-                       $this->archive = new PackageArchive($this->downloadPackage, $this->package);
-                       
-                       try {
-                               $this->downloadPackage = $this->archive->downloadArchive();
-                       }
-                       catch (SystemException $e) {
-                               throw new UserInputException('downloadPackage', 'downloadFailed');
-                       }
-               }
-               else {
-                       // probably local path
-                       if (!file_exists($this->downloadPackage)) {
-                               throw new UserInputException('downloadPackage', 'downloadFailed');
-                       }
-               }
-               
-               if (!PackageValidationManager::getInstance()->validate($this->downloadPackage, false)) {
-                       $exception = PackageValidationManager::getInstance()->getException();
-                       if ($exception instanceof PackageValidationException) {
-                               switch ($exception->getCode()) {
-                                       case PackageValidationException::INVALID_PACKAGE_NAME:
-                                       case PackageValidationException::MISSING_PACKAGE_XML:
-                                               throw new UserInputException('downloadPackage', 'noValidPackage');
-                                       break;
-                               }
-                       }
-               }
-               
-               $this->package = PackageValidationManager::getInstance()->getPackageValidationArchive()->getPackage();
-               
-       }
-       
        /**
         * @see \wcf\form\IForm::save()
         */
@@ -208,7 +158,6 @@ class PackageStartInstallForm extends AbstractForm {
                // obey foreign key
                $packageID = ($this->package) ? $this->package->packageID : null;
                
-               $archive = $this->downloadPackage;
                if ($this->stylePackageImportLocation) {
                        $archive = $this->stylePackageImportLocation;
                }
index 17ef3a303309d4443aea86b4c43b7bbe6a899a3e..2c99eb15e3a068667e68159c44ef45756e76996a 100644 (file)
@@ -8,6 +8,8 @@
        position: relative;
        
        > ul {
+               border-bottom: 1px solid $wcfContentBorderInner;
+               
                @extend .inlineList;
                
                > li {