Small optimization
authorMarcel Werk <burntime@woltlab.com>
Thu, 9 May 2013 20:40:32 +0000 (22:40 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 9 May 2013 20:40:32 +0000 (22:40 +0200)
Closes #1268

wcfsetup/install/files/acp/templates/styleExport.tpl

index 333878b9b2222179b34091b73a09fcc7a2bda3d5..885afed46c094fa08bbeb2dfc2ad3509d70149e9 100644 (file)
@@ -1,5 +1,20 @@
 {include file='header' pageTitle='wcf.acp.style.exportStyle'}
 
+<script type="text/javascript">
+       //<![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>
                        
                        <dl>
                                <dd>
-                                       <label><input type="checkbox" name="exportAsPackage" value="1"{if $exportAsPackage} checked="checked"{/if} /> <span>{lang}wcf.acp.style.exportAsPackage{/lang}</span></label>
+                                       <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{if $errorField == 'packageName'} class="formError"{/if}>
+                       <dl id="packageNameDl"{if $errorField == 'packageName'} class="formError"{/if}>
                                <dt>
                                        <label for="packageName">{lang}wcf.acp.style.packageName{/lang}</label>
                                </dt>