Merge remote-tracking branch 'refs/remotes/origin/3.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / settings.tpl
CommitLineData
3e93caf9 1{capture assign='pageTitle'}{lang}wcf.user.option.category.settings.{$category}{/lang} - {lang}wcf.user.menu.settings{/lang}{/capture}
320f4a6d 2
3e93caf9 3{capture assign='contentTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.option.category.settings.{$category}{/lang}{/capture}
320f4a6d
MW
4
5{include file='userMenuSidebar'}
6
c5ea84f0 7{include file='header' __disableAds=true __sidebarLeftHasMenu=true}
320f4a6d 8
77329f86
AE
9{include file='formError'}
10
320f4a6d
MW
11{if $success|isset}
12 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
13{/if}
14
320f4a6d 15<form method="post" action="{link controller='Settings'}{/link}">
95961bdf
MW
16 {if $category == 'general'}
17 {if $availableLanguages|count > 1}
18 <section class="section">
19 <h2 class="sectionTitle">{lang}wcf.user.language{/lang}</h2>
20
21 <dl>
22 <dt><label>{lang}wcf.user.language{/lang}</label></dt>
23 <dd id="languageIDContainer">
24 <script data-relocate="true">
95961bdf
MW
25 $(function() {
26 var $languages = {
27 {implode from=$availableLanguages item=language}
28 '{@$language->languageID}': {
3664a4c4
MW
29 iconPath: '{@$language->getIconPath()|encodeJS}',
30 languageName: '{@$language|encodeJS}'
95961bdf
MW
31 }
32 {/implode}
33 };
34
35 new WCF.Language.Chooser('languageIDContainer', 'languageID', {@$languageID}, $languages);
36 });
95961bdf
MW
37 </script>
38 <noscript>
39 <select name="languageID" id="languageID">
40 {foreach from=$availableLanguages item=language}
6f2bc235 41 <option value="{@$language->languageID}"{if $language->languageID == $languageID} selected{/if}>{$language}</option>
edf7add2
MW
42 {/foreach}
43 </select>
95961bdf
MW
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}
6f2bc235 54 <label><input name="contentLanguageIDs[]" type="checkbox" value="{@$language->languageID}"{if $language->languageID|in_array:$contentLanguageIDs} checked{/if}> {$language}</label>
95961bdf
MW
55 {/foreach}
56 {/content}
57 <small>{lang}wcf.user.visibleLanguages.description{/lang}</small></dd>
edf7add2 58 </dl>
95961bdf
MW
59 {/hascontent}
60
61 {event name='languageFields'}
62 </section>
320f4a6d
MW
63 {/if}
64
95961bdf
MW
65 {if $availableStyles|count > 1}
66 <section class="section">
67 <h2 class="sectionTitle">{lang}wcf.user.style{/lang}</h2>
68
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}
6f2bc235 75 <option value="{@$style->styleID}"{if $style->styleID == $styleID} selected{/if}>{$style->styleName}</option>
95961bdf
MW
76 {/foreach}
77 </select>
78 <small>{lang}wcf.user.style.description{/lang}</small>
79 </dd>
80 </dl>
81
82 {event name='styleFields'}
83 </section>
31484d86 84 {/if}
a83d788a
JR
85
86 {if MODULE_TROPHY && $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') > 0 && $availableTrophies|count}
87 <section class="section">
88 <h2 class="sectionTitle">{lang}wcf.user.trophy.trophies{/lang}</h2>
89 <dl{if $errorField == 'specialTrophies'} class="formError"{/if}>
90 <dt>{lang}wcf.user.trophy.specialTrophies{/lang}</dt>
91 <dd>
6328e311 92 <ul class="specialTrophyList">
a83d788a
JR
93 {if $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') == 1}
94 {foreach from=$availableTrophies item=trophy}
95 <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>
96 {/foreach}
97 {else}
98 {foreach from=$availableTrophies item=trophy}
99 <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>
100 {/foreach}
101 {/if}
102 </ul>
103 {if $errorField == 'specialTrophies'}
104 <small class="innerError">
105 {lang}wcf.user.trophy.specialTrophies.error.{$errorType}{/lang}
106 </small>
107 {/if}
108 <small>{lang}wcf.user.trophy.specialTrophies.description{/lang}</small>
109 </dd>
110 </dl>
111
112 {event name='trophyFields'}
113 </section>
114 {/if}
95961bdf
MW
115 {/if}
116
117 {if !$optionTree|empty}
118 {foreach from=$optionTree[0][categories][0][categories] item=optionCategory}
119 <section class="section">
120 <h2 class="sectionTitle">{lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang}</h2>
121
122 {include file='userProfileOptionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'}
123 </section>
124 {/foreach}
125 {/if}
126
127 {event name='sections'}
320f4a6d
MW
128
129 <div class="formSubmit">
e5f9b56c
MW
130 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
131 {if $category != 'general'}<input type="hidden" name="category" value="{$category}">{/if}
77329f86 132 {@SECURITY_TOKEN_INPUT_TAG}
320f4a6d
MW
133 </div>
134</form>
135
3e93caf9 136<script data-relocate="true">
3e93caf9
MW
137 $(function() {
138 new WCF.Option.Handler();
139 });
3e93caf9 140</script>
320f4a6d 141
b3463f2a 142{include file='footer' __disableAds=true}