Moved the package upload into a dialog element
authorAlexander Ebert <ebert@woltlab.com>
Tue, 16 Apr 2019 09:03:16 +0000 (11:03 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 16 Apr 2019 09:03:16 +0000 (11:03 +0200)
wcfsetup/install/files/acp/templates/packageStartInstall.tpl

index f1dd8451c8c4bc163bcf2364da015b533aed02dd..45ff40e570d8284fbcb9f66e67e578393b0735e8 100644 (file)
@@ -23,6 +23,7 @@
        
        <nav class="contentHeaderNavigation">
                <ul>
+                       <li><a href="#" class="button jsStaticDialog" data-dialog-id="packageUploadDialog"><span class="icon icon16 fa-upload"></span> <span>{lang}wcf.acp.package.upload{/lang}</span></a></li>
                        <li><a href="{link controller='PackageList'}{/link}" class="button"><span class="icon icon16 fa-list"></span> <span>{lang}wcf.acp.menu.link.package.list{/lang}</span></a></li>
                        
                        {event name='contentHeaderNavigation'}
 
 {include file='formError'}
 
-<div class="section tabMenuContainer" data-active="{$activeTabMenuItem}" data-store="activeTabMenuItem">
-       <nav class="tabMenu">
-               <ul>
-                       <li><a href="{@$__wcf->getAnchor('packageSearch')}">{lang}wcf.acp.package.search{/lang}</a></li>
-                       <li><a href="{@$__wcf->getAnchor('upload')}">{lang}wcf.acp.package.upload{/lang}</a></li>
-               </ul>
-       </nav>
+<div class="section">
+       <section class="section">
+               <h2 class="sectionTitle">{lang}wcf.acp.package.search{/lang}</h2>
+               
+               <dl>
+                       <dt><label for="packageName">{lang}wcf.acp.package.search.packageName{/lang}</label></dt>
+                       <dd><input type="text" id="packageName" value="" class="long" data-search-name="packageName"></dd>
+               </dl>
+               <dl>
+                       <dt><label for="packageDescription">{lang}wcf.acp.package.search.packageDescription{/lang}</label></dt>
+                       <dd><input type="text" id="packageDescription" value="" class="long" data-search-name="packageDescription"></dd>
+               </dl>
+               <dl>
+                       <dt><label for="package">{lang}wcf.acp.package.search.package{/lang}</label></dt>
+                       <dd>
+                               <input type="text" id="package" value="" class="medium" data-search-name="package">
+                               <small>{lang}wcf.acp.package.search.package.description{/lang}</small>
+                       </dd>
+               </dl>
+               
+               <div class="formSubmit">
+                       <button class="jsButtonPackageSearch">{lang}wcf.global.button.submit{/lang}</button>
+               </div>
+       </section>
        
-       <div id="packageSearch" class="tabMenuContent">
+       <section class="section tabularBox" id="packageSearchResultContainer" style="display: none;">
+               <h2 class="sectionTitle">{lang}wcf.acp.package.search.resultList{/lang} <span class="badge">0</span></h2>
+               
+               <div id="packageSearchResultList"></div>
+       </section>
+</div>
+
+<div id="packageUploadDialog" class="jsStaticDialogContent" data-title="{lang}wcf.acp.package.upload{/lang}">
+       <form method="post" action="{link controller='PackageStartInstall'}{/link}" enctype="multipart/form-data">
                <div class="section">
-                       <dl>
-                               <dt><label for="packageName">{lang}wcf.acp.package.search.packageName{/lang}</label></dt>
-                               <dd><input type="text" id="packageName" value="" class="long" data-search-name="packageName"></dd>
-                       </dl>
-                       <dl>
-                               <dt><label for="packageDescription">{lang}wcf.acp.package.search.packageDescription{/lang}</label></dt>
-                               <dd><input type="text" id="packageDescription" value="" class="long" data-search-name="packageDescription"></dd>
-                       </dl>
-                       <dl>
-                               <dt><label for="package">{lang}wcf.acp.package.search.package{/lang}</label></dt>
+                       <dl{if $errorField == 'uploadPackage'} class="formError"{/if}>
+                               <dt><label for="uploadPackage">{lang}wcf.acp.package.source.upload{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="package" value="" class="medium" data-search-name="package">
-                                       <small>{lang}wcf.acp.package.search.package.description{/lang}</small>
+                                       <input type="file" id="uploadPackage" name="uploadPackage" value="" accept="application/x-tar,application/gzip,application/tar+gzip">
+                                       {if $errorField == 'uploadPackage'}
+                                               <small class="innerError">
+                                                       {if $errorType == 'empty'}
+                                                               {lang}wcf.global.form.error.empty{/lang}
+                                                       {else}
+                                                               {lang}wcf.acp.package.error.{@$errorType}{/lang}
+                                                       {/if}
+                                               </small>
+                                       {/if}
+                                       <small>{lang}wcf.acp.package.source.upload.description{/lang}</small>
                                </dd>
                        </dl>
                </div>
                
                <div class="formSubmit">
-                       <button class="jsButtonPackageSearch">{lang}wcf.global.button.submit{/lang}</button>
+                       <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
+                       <input type="hidden" name="action" value="{$action}">
+                       {@SECURITY_TOKEN_INPUT_TAG}
                </div>
-               
-               <section class="section tabularBox" id="packageSearchResultContainer" style="display: none;">
-                       <h2 class="sectionTitle">{lang}wcf.acp.package.search.resultList{/lang} <span class="badge">0</span></h2>
-                       
-                       <div id="packageSearchResultList"></div>
-               </section>
-       </div>
-       
-       <div id="upload" class="tabMenuContent">
-               <form method="post" action="{link controller='PackageStartInstall'}{/link}" enctype="multipart/form-data">
-                       <div class="section">
-                               <dl{if $errorField == 'uploadPackage'} class="formError"{/if}>
-                                       <dt><label for="uploadPackage">{lang}wcf.acp.package.source.upload{/lang}</label></dt>
-                                       <dd>
-                                               <input type="file" id="uploadPackage" name="uploadPackage" value="" accept="application/x-tar,application/gzip,application/tar+gzip">
-                                               {if $errorField == 'uploadPackage'}
-                                                       <small class="innerError">
-                                                               {if $errorType == 'empty'}
-                                                                       {lang}wcf.global.form.error.empty{/lang}
-                                                               {else}
-                                                                       {lang}wcf.acp.package.error.{@$errorType}{/lang}
-                                                               {/if}
-                                                       </small>
-                                               {/if}
-                                               <small>{lang}wcf.acp.package.source.upload.description{/lang}</small>
-                                       </dd>
-                               </dl>
-                       </div>
-                       
-                       <div class="formSubmit">
-                               <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
-                               <input type="hidden" name="action" value="{$action}">
-                               {@SECURITY_TOKEN_INPUT_TAG}
-                       </div>
-               </form>
-       </div>
+       </form>
 </div>
 
 {include file='footer'}