Moved rewrite test into a separate template
authorAlexander Ebert <ebert@woltlab.com>
Thu, 20 Jul 2017 12:35:46 +0000 (14:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 20 Jul 2017 12:35:46 +0000 (14:35 +0200)
See #2320

wcfsetup/install/files/acp/templates/__optionRewriteTest.tpl [new file with mode: 0644]
wcfsetup/install/files/acp/templates/option.tpl

diff --git a/wcfsetup/install/files/acp/templates/__optionRewriteTest.tpl b/wcfsetup/install/files/acp/templates/__optionRewriteTest.tpl
new file mode 100644 (file)
index 0000000..37b2f1d
--- /dev/null
@@ -0,0 +1,33 @@
+{if $category->categoryName === 'general'}
+       <div id="dialogRewriteTest" style="display: none">
+               <div id="dialogRewriteTestRunning" class="box24">
+                       <span class="icon icon24 fa-spinner"></span>
+                       <p>{lang}wcf.acp.option.url_omit_index_php.test.running{/lang}</p>
+               </div>
+               <div id="dialogRewriteTestSuccess" class="box24" style="display: none">
+                       <span class="icon icon24 fa-check green"></span>
+                       <p>{lang}wcf.acp.option.url_omit_index_php.test.success{/lang}</p>
+               </div>
+               
+               <div id="dialogRewriteTestFailure" style="display: none">
+                       <div class="box24">
+                               <span class="icon icon24 fa-times red"></span>
+                               <p>{lang}wcf.acp.option.url_omit_index_php.test.failure{/lang}</p>
+                       </div>
+                       <p>{lang}wcf.acp.option.url_omit_index_php.test.failure.description{/lang}</p>
+               </div>
+               
+               <div class="formSubmit">
+                       <button id="rewriteTestStart" class="buttonPrimary">{lang}wcf.acp.option.url_omit_index_php.button.runTestAgain{/lang}</button>
+               </div>
+       </div>
+       <script data-relocate="true">
+               require(['Language', 'WoltLabSuite/Core/Acp/Ui/Option/RewriteTest'], function (Language, AcpUiOptionRewriteTest) {
+                       Language.addObject({
+                               'wcf.acp.option.url_omit_index_php': '{lang}wcf.acp.option.url_omit_index_php{/lang}'
+                       });
+                       
+                       AcpUiOptionRewriteTest.init('{$__wcf->getPath()}core-rewrite-test/?uuidHash={'sha256'|hash:WCF_UUID}');
+               });
+       </script>
+{/if}
index f062b0d020297fe509cf03c31195455cd8a906f1..d8bd8941b28140c9b0e2855c2b0db97c534e9612 100644 (file)
        </div>
 </form>
 
-{if $category->categoryName === 'general'}
-       <div id="dialogRewriteTest" style="display: none">
-               <div id="dialogRewriteTestRunning" class="box24">
-                       <span class="icon icon24 fa-spinner"></span>
-                       <p>{lang}wcf.acp.option.url_omit_index_php.test.running{/lang}</p>
-               </div>
-               <div id="dialogRewriteTestSuccess" class="box24" style="display: none">
-                       <span class="icon icon24 fa-check green"></span>
-                       <p>{lang}wcf.acp.option.url_omit_index_php.test.success{/lang}</p>
-               </div>
-               
-               <div id="dialogRewriteTestFailure" style="display: none">
-                       <div class="box24">
-                               <span class="icon icon24 fa-times red"></span>
-                               <p>{lang}wcf.acp.option.url_omit_index_php.test.failure{/lang}</p>
-                       </div>
-                       <p>{lang}wcf.acp.option.url_omit_index_php.test.failure.description{/lang}</p>
-               </div>
-               
-               <div class="formSubmit">
-                       <button id="rewriteTestStart" class="buttonPrimary">{lang}wcf.acp.option.url_omit_index_php.button.runTestAgain{/lang}</button>
-               </div>
-       </div>
-       <script data-relocate="true">
-               require(['Language', 'WoltLabSuite/Core/Acp/Ui/Option/RewriteTest'], function (Language, AcpUiOptionRewriteTest) {
-                       Language.addObject({
-                               'wcf.acp.option.url_omit_index_php': '{lang}wcf.acp.option.url_omit_index_php{/lang}'
-                       });
-                       
-                       AcpUiOptionRewriteTest.init('{$__wcf->getPath()}core-rewrite-test/?uuidHash={'sha256'|hash:WCF_UUID}');
-               });
-       </script>
-{/if}
+{include file='__optionRewriteTest'}
 
 {include file='footer'}