Commit | Line | Data |
---|---|---|
7485c55b | 1 | {include file='header' pageTitle='wcf.acp.option.category.'|concat:$category->categoryName} |
8c34456d | 2 | |
169db608 MB |
3 | {event name='javascriptInclude'} |
4 | ||
9543d9fe | 5 | <script data-relocate="true"> |
158bd3ca | 6 | $(function() { |
0adad627 | 7 | new WCF.Option.Handler(); |
6d5d2aa4 AE |
8 | |
9 | {if $optionName} | |
d74dbc9a AE |
10 | setTimeout(function() { |
11 | var option = elById('{$optionName}'); | |
12 | var div = elCreate('div'); | |
13 | div.id = 'wcfOptionAnchor'; | |
14 | div.style.setProperty('position', 'absolute', ''); | |
15 | div.style.setProperty('top', (option.closest('dl').offsetTop - 60) + 'px', ''); | |
16 | document.body.appendChild(div); | |
17 | div.scrollIntoView({ behavior: 'smooth' }); | |
6d5d2aa4 | 18 | |
d74dbc9a | 19 | option.focus(); |
6d5d2aa4 AE |
20 | }, 200); |
21 | {/if} | |
158bd3ca | 22 | }); |
169db608 MB |
23 | |
24 | {event name='javascriptInit'} | |
158bd3ca TD |
25 | </script> |
26 | ||
95961bdf | 27 | <header class="contentHeader"> |
b5c94e9e AE |
28 | <div class="contentHeaderTitle"> |
29 | <h1 class="contentTitle">{lang}wcf.acp.option.category.{$category->categoryName}{/lang}</h1> | |
30 | {hascontent}<p class="contentHeaderDescription">{content}{lang __optional=true}wcf.acp.option.category.{$category->categoryName}.description{/lang}{/content}</p>{/hascontent} | |
31 | </div> | |
32 | ||
33 | {hascontent} | |
34 | <nav class="contentHeaderNavigation"> | |
35 | <ul> | |
36 | {content}{event name='contentHeaderNavigation'}{/content} | |
37 | </ul> | |
38 | </nav> | |
39 | {/hascontent} | |
158bd3ca TD |
40 | </header> |
41 | ||
42 | {if $success|isset} | |
9b566f66 | 43 | <p class="success">{lang}wcf.global.success.edit{/lang}</p> |
158bd3ca TD |
44 | {/if} |
45 | ||
ee629b22 | 46 | {include file='formError'} |
158bd3ca | 47 | |
a89f2a0d | 48 | <form method="post" action="{link controller='Option' id=$category->categoryID}{/link}" enctype="multipart/form-data"> |
11d097f2 | 49 | {* |
b5c94e9e | 50 | fake fields are a workaround for chrome autofill picking the wrong fields |
11d097f2 MW |
51 | taken from http://stackoverflow.com/a/15917221 |
52 | *} | |
b5c94e9e AE |
53 | <input style="display:none" type="text" name="fakeusernameremembered"> |
54 | <input style="display:none" type="password" name="fakepasswordremembered"> | |
20fa2dc6 | 55 | |
95961bdf | 56 | <div class="section tabMenuContainer" data-active="{$activeTabMenuItem}" data-store="activeTabMenuItem"> |
184a8d6d | 57 | <nav class="tabMenu"> |
6592a552 | 58 | <ul> |
158bd3ca | 59 | {foreach from=$optionTree item=categoryLevel1} |
3d9029c9 AE |
60 | {capture assign=__categoryName}category_{$categoryLevel1[object]->categoryName}{/capture} |
61 | <li><a href="{@$__wcf->getAnchor($__categoryName)}" title="{lang}wcf.acp.option.category.{@$categoryLevel1[object]->categoryName}{/lang}">{lang}wcf.acp.option.category.{@$categoryLevel1[object]->categoryName}{/lang}</a></li> | |
158bd3ca TD |
62 | {/foreach} |
63 | </ul> | |
64 | </nav> | |
65 | ||
66 | {foreach from=$optionTree item=categoryLevel1} | |
3d9029c9 | 67 | <div id="category_{@$categoryLevel1[object]->categoryName}" class="hidden tabMenuContent"> |
eee4c4ff | 68 | {if $categoryLevel1[options]|count} |
1373e70c | 69 | <div class="section"> |
1f732489 AE |
70 | {if $categoryLevel1[object]->categoryName === 'module.development'}<p class="warning">{lang}wcf.acp.option.category.module.development.notice{/lang}</p>{/if} |
71 | ||
eee4c4ff | 72 | {include file='optionFieldList' options=$categoryLevel1[options] langPrefix='wcf.acp.option.'} |
1373e70c | 73 | </div> |
eee4c4ff L |
74 | {/if} |
75 | ||
76 | {if $categoryLevel1[categories]|count} | |
77 | {foreach from=$categoryLevel1[categories] item=categoryLevel2} | |
95961bdf MW |
78 | <section class="section"> |
79 | <header class="sectionHeader"> | |
80 | <h2 class="sectionTitle">{lang}wcf.acp.option.category.{@$categoryLevel2[object]->categoryName}{/lang}</h2> | |
114b5320 | 81 | {hascontent}<p class="sectionDescription">{content}{lang __optional=true}wcf.acp.option.category.{$categoryLevel2[object]->categoryName}.description{/lang}{/content}</p>{/hascontent} |
95961bdf | 82 | </header> |
eee4c4ff L |
83 | |
84 | {include file='optionFieldList' options=$categoryLevel2[options] langPrefix='wcf.acp.option.'} | |
95961bdf | 85 | </section> |
eee4c4ff L |
86 | {/foreach} |
87 | {/if} | |
158bd3ca TD |
88 | </div> |
89 | {/foreach} | |
90 | </div> | |
91 | ||
184a8d6d | 92 | <div class="formSubmit"> |
e5f9b56c | 93 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" name="__submit" accesskey="s"> |
ee629b22 | 94 | {@SECURITY_TOKEN_INPUT_TAG} |
39bea7dd | 95 | </div> |
158bd3ca TD |
96 | </form> |
97 | ||
4c466d5e AE |
98 | {if $category->categoryName === 'general'} |
99 | <div id="dialogRewriteTest" style="display: none"> | |
100 | <div id="dialogRewriteTestRunning" class="box24"> | |
101 | <span class="icon icon24 fa-spinner"></span> | |
102 | <p>{lang}wcf.acp.option.url_omit_index_php.test.running{/lang}</p> | |
103 | </div> | |
104 | <div id="dialogRewriteTestSuccess" class="box24" style="display: none"> | |
105 | <span class="icon icon24 fa-check green"></span> | |
106 | <p>{lang}wcf.acp.option.url_omit_index_php.test.success{/lang}</p> | |
107 | </div> | |
108 | ||
109 | <div id="dialogRewriteTestFailure" style="display: none"> | |
110 | <div class="box24"> | |
111 | <span class="icon icon24 fa-times red"></span> | |
112 | <p>{lang}wcf.acp.option.url_omit_index_php.test.failure{/lang}</p> | |
113 | </div> | |
114 | <p>{lang}wcf.acp.option.url_omit_index_php.test.failure.description{/lang}</p> | |
115 | </div> | |
116 | ||
117 | <div class="formSubmit"> | |
118 | <button id="rewriteTestStart" class="buttonPrimary">{lang}wcf.acp.option.url_omit_index_php.button.runTestAgain{/lang}</button> | |
119 | </div> | |
120 | </div> | |
121 | <script data-relocate="true"> | |
122 | require(['Language', 'WoltLabSuite/Core/Acp/Ui/Option/RewriteTest'], function (Language, AcpUiOptionRewriteTest) { | |
123 | Language.addObject({ | |
124 | 'wcf.acp.option.url_omit_index_php': '{lang}wcf.acp.option.url_omit_index_php{/lang}' | |
125 | }); | |
126 | ||
127 | AcpUiOptionRewriteTest.init('{$__wcf->getPath()}core-rewrite-test/?uuidHash={'sha256'|hash:WCF_UUID}'); | |
128 | }); | |
129 | </script> | |
130 | {/if} | |
131 | ||
68740962 | 132 | {include file='footer'} |