3fd32e45d29ea47a72c0ee446339def71d323bf2
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / settings.tpl
1 {capture assign='pageTitle'}{lang}wcf.user.option.category.settings.{$category}{/lang} - {lang}wcf.user.menu.settings{/lang}{/capture}
2
3 {capture assign='contentTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.option.category.settings.{$category}{/lang}{/capture}
4
5 {include file='userMenuSidebar'}
6
7 {include file='header' __disableAds=true __sidebarLeftHasMenu=true}
8
9 {include file='shared_formError'}
10
11 {if $success|isset}
12 <woltlab-core-notice type="success">{lang}wcf.global.success.edit{/lang}</woltlab-core-notice>
13 {/if}
14
15 <form method="post" action="{$formAction}">
16 {if $category == 'general'}
17 {if $availableLanguages|count > 1}
18 <section class="section" id="section_language">
19 <h2 class="sectionTitle">{lang}wcf.user.language{/lang}</h2>
20
21 <dl>
22 <dt><label>{lang}wcf.user.language.description{/lang}</label></dt>
23 <dd id="languageIDContainer">
24 <script data-relocate="true">
25 require(['WoltLabSuite/Core/Language/Chooser'], ({ init }) => {
26 const languages = {
27 {implode from=$availableLanguages item=language}
28 '{@$language->languageID}': {
29 iconPath: '{@$language->getIconPath()|encodeJS}',
30 languageName: '{@$language|encodeJS}'
31 }
32 {/implode}
33 };
34
35 init('languageIDContainer', 'languageID', {@$languageID}, languages);
36 });
37 </script>
38 <noscript>
39 <select name="languageID" id="languageID">
40 {foreach from=$availableLanguages item=language}
41 <option value="{$language->languageID}"{if $language->languageID == $languageID} selected{/if}>{$language}</option>
42 {/foreach}
43 </select>
44 </noscript>
45 </dd>
46 </dl>
47
48 {hascontent}
49 <dl>
50 <dt><label>{lang}wcf.user.visibleLanguages{/lang}</label></dt>
51 <dd class="floated">
52 {content}
53 {foreach from=$availableContentLanguages item=language}
54 <label><input name="contentLanguageIDs[]" type="checkbox" value="{$language->languageID}"{if $language->languageID|in_array:$contentLanguageIDs} checked{/if}> {$language}</label>
55 {/foreach}
56 {/content}
57 <small>{lang}wcf.user.visibleLanguages.description{/lang}</small></dd>
58 </dl>
59 {/hascontent}
60
61 {event name='languageFields'}
62 </section>
63 {/if}
64
65 <section class="section" id="section_style">
66 <h2 class="sectionTitle">{lang}wcf.user.styles{/lang}</h2>
67
68 {if $availableStyles|count > 1}
69 <dl>
70 <dt><label for="styleID">{lang}wcf.user.style{/lang}</label></dt>
71 <dd>
72 <select id="styleID" name="styleID">
73 <option value="0">{lang}wcf.global.defaultValue{/lang}</option>
74 {foreach from=$availableStyles item=style}
75 <option value="{$style->styleID}"{if $style->styleID == $styleID} selected{/if}>{$style->styleName}</option>
76 {/foreach}
77 </select>
78 <small>{lang}wcf.user.style.description{/lang}</small>
79 </dd>
80 </dl>
81 {/if}
82
83 <dl>
84 <dt><label for="colorScheme">{lang}wcf.user.style.colorScheme{/lang}</label></dt>
85 <dd>
86 <select id="colorScheme" name="colorScheme">
87 <option value="system"{if $colorScheme === 'system'} selected{/if}>{lang}wcf.style.setColorScheme.system{/lang}</option>
88 <option value="light"{if $colorScheme === 'light'} selected{/if}>{lang}wcf.style.setColorScheme.light{/lang}</option>
89 <option value="dark"{if $colorScheme === 'dark'} selected{/if}>{lang}wcf.style.setColorScheme.dark{/lang}</option>
90 </select>
91 <small>{lang}wcf.user.style.colorScheme.description{/lang}</small>
92 </dd>
93 </dl>
94
95 {event name='styleFields'}
96 </section>
97
98 {if MODULE_TROPHY && $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') > 0 && $availableTrophies|count}
99 <section class="section" id="section_trophy">
100 <h2 class="sectionTitle">{lang}wcf.user.trophy.trophies{/lang}</h2>
101 <dl{if $errorField == 'specialTrophies'} class="formError"{/if}>
102 <dt>{lang}wcf.user.trophy.specialTrophies{/lang}</dt>
103 <dd>
104 <ul class="specialTrophyList">
105 {if $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') == 1}
106 {foreach from=$availableTrophies item=trophy}
107 <li><label><input type="radio" name="specialTrophies[]" value="{$trophy->getObjectID()}"{if $trophy->getObjectID()|in_array:$specialTrophies} checked{/if}> {@$trophy->renderTrophy(32)} <span>{$trophy->getTitle()}</span></label></li>
108 {/foreach}
109 {else}
110 {foreach from=$availableTrophies item=trophy}
111 <li><label><input type="checkbox" name="specialTrophies[]" value="{$trophy->getObjectID()}"{if $trophy->getObjectID()|in_array:$specialTrophies} checked{/if}> {@$trophy->renderTrophy(32)} <span>{$trophy->getTitle()}</span></label></li>
112 {/foreach}
113 {/if}
114 </ul>
115 {if $errorField == 'specialTrophies'}
116 <small class="innerError">
117 {lang}wcf.user.trophy.specialTrophies.error.{$errorType}{/lang}
118 </small>
119 {/if}
120 <small>{lang}wcf.user.trophy.specialTrophies.description{/lang}</small>
121 </dd>
122 </dl>
123
124 {event name='trophyFields'}
125 </section>
126 {/if}
127 {/if}
128
129 {if !$optionTree|empty}
130 {foreach from=$optionTree[0][categories][0][categories] item=optionCategory}
131 <section class="section" id="optionCategory_{@$optionCategory[object]->categoryName}">
132 <h2 class="sectionTitle">{lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang}</h2>
133
134 {include file='userProfileOptionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'}
135 </section>
136 {/foreach}
137 {/if}
138
139 {event name='sections'}
140
141 <div class="formSubmit">
142 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
143 {if $category != 'general'}<input type="hidden" name="category" value="{$category}">{/if}
144 {csrfToken}
145 </div>
146 </form>
147
148 <script data-relocate="true">
149 $(function() {
150 new WCF.Option.Handler();
151 });
152 </script>
153
154 {include file='footer' __disableAds=true}