Export as package now requires a set packageName
authorAlexander Ebert <ebert@woltlab.com>
Wed, 15 Jul 2015 10:27:58 +0000 (12:27 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 15 Jul 2015 10:27:58 +0000 (12:27 +0200)
wcfsetup/install/files/acp/templates/styleAdd.tpl
wcfsetup/install/files/acp/templates/styleExport.tpl

index cc85a392a5a2342ec1e27e0056e8fbfa7d6a0d47..3ab155d8643a90cf7686d8f230181f904907cbe0 100644 (file)
@@ -77,7 +77,9 @@
                
                {* general *}
                <div id="general" class="container containerPadding tabMenuContent">
-                       <fieldset>
+                       <p class="info">{lang}wcf.acp.style.protected{/lang}</p>
+                       
+                       <fieldset class="marginTop">
                                <legend>{lang}wcf.acp.style.general.data{/lang}</legend>
                                
                                <dl{if $errorField == 'styleName'} class="formError"{/if}>
index e34fd66634cc62636de67c3e0f8601daa8eab313..b6b7fd4235c222746871799fe8504cce2b295ad6 100644 (file)
@@ -1,20 +1,5 @@
 {include file='header' pageTitle='wcf.acp.style.exportStyle'}
 
-<script data-relocate="true">
-       //<![CDATA[
-       $(function() {
-               $('#exportAsPackage').change(function (event) {
-                       if ($('#exportAsPackage').is(':checked')) {
-                               $('#packageNameDl').show();
-                       }
-                       else {
-                               $('#packageNameDl').hide();
-                       }
-               }).trigger('change');
-       });
-       //]]>
-</script>
-
 <header class="boxHeadline">
        <h1>{lang}wcf.acp.style.exportStyle{/lang}</h1>
 </header>
                        {event name='componentFields'}
                </fieldset>
                
-               <fieldset>
-                       <legend>{lang}wcf.acp.style.exportStyle.asPackage{/lang}</legend>
-                       <small>{lang}wcf.acp.style.exportStyle.asPackage.description{/lang}</small>
-                       
-                       <dl>
-                               <dt></dt>
-                               <dd>
-                                       <label><input type="checkbox" id="exportAsPackage" name="exportAsPackage" value="1"{if $exportAsPackage} checked="checked"{/if} /> <span>{lang}wcf.acp.style.exportAsPackage{/lang}</span></label>
-                               </dd>
-                       </dl>
-                       <dl id="packageNameDl"{if $errorField == 'packageName'} class="formError"{/if}>
-                               <dt>
-                                       <label for="packageName">{lang}wcf.acp.style.packageName{/lang}</label>
-                               </dt>
-                               <dd>
-                                       <input type="text" name="packageName" id="packageName" class="long" value="{$packageName}" />
-                                       {if $errorField == 'packageName'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.style.packageName.error.{$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.style.packageName.description{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       {event name='exportAsPackageFields'}
-               </fieldset>
+               {if $style->packageName}
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.exportStyle.asPackage{/lang}</legend>
+                               <small>{lang}wcf.acp.style.exportStyle.asPackage.description{/lang}</small>
+                               
+                               <dl>
+                                       <dt></dt>
+                                       <dd>
+                                               <label><input type="checkbox" id="exportAsPackage" name="exportAsPackage" value="1"{if $exportAsPackage} checked="checked"{/if} /> <span>{lang}wcf.acp.style.exportAsPackage{/lang}</span></label>
+                                       </dd>
+                               </dl>
+                               
+                               {event name='exportAsPackageFields'}
+                       </fieldset>
+               {/if}
                
                {event name='fieldsets'}
        </div>