Merge remote-tracking branch 'refs/remotes/origin/3.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / register.tpl
1 {capture assign='headContent'}
2 <style type="text/css">
3 #fieldset1 {
4 display: none;
5 }
6 </style>
7 {/capture}
8
9 {include file='header' __disableLoginLink=true __disableAds=true}
10
11 {if $isExternalAuthentication}
12 <p class="info">{lang}wcf.user.3rdparty.{$__wcf->session->getVar('__3rdPartyProvider')}.register{/lang}</p>
13 {/if}
14
15 {include file='formError'}
16
17 <form method="post" action="{link controller='Register'}{/link}">
18 <div class="section">
19 <dl{if $errorType.username|isset} class="formError"{/if}>
20 <dt>
21 <label for="{@$randomFieldNames[username]}">{lang}wcf.user.username{/lang}</label>
22 </dt>
23 <dd>
24 <input type="text" id="{@$randomFieldNames[username]}" name="{@$randomFieldNames[username]}" value="{$username}" required class="medium">
25 {if $errorType.username|isset}
26 <small class="innerError">
27 {if $errorType.username == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
28 {if $errorType.username == 'invalid'}{lang}wcf.user.username.error.invalid{/lang}{/if}
29 {if $errorType.username == 'notUnique'}{lang}wcf.user.username.error.notUnique{/lang}{/if}
30 </small>
31 {/if}
32 <small>{lang}wcf.user.username.description{/lang}</small>
33 </dd>
34 </dl>
35
36 {event name='usernameFields'}
37 </div>
38
39 <section class="section" id="fieldset1">
40 <header class="sectionHeader">
41 <h2 class="sectionTitle">{lang}wcf.user.register.honeyPot{/lang}</h2>
42 <p class="sectionDescription">{lang}wcf.user.register.honeyPot.description{/lang}</p>
43 </header>
44
45 <dl>
46 <dt>
47 <label for="username">{lang}wcf.user.username{/lang}</label>
48 </dt>
49 <dd>
50 <input type="text" id="username" name="username" value="" autocomplete="off" class="medium" tabindex="998">
51 </dd>
52 </dl>
53
54 <dl>
55 <dt>
56 <label for="email">{lang}wcf.user.email{/lang}</label>
57 </dt>
58 <dd>
59 <input type="email" id="email" name="email" value="" autocomplete="off" class="medium" tabindex="999">
60 </dd>
61 </dl>
62
63 {event name='honeyPotFields'}
64 </section>
65
66 <section class="section">
67 <h2 class="sectionTitle">{lang}wcf.user.email{/lang}</h2>
68
69 <dl{if $errorType.email|isset} class="formError"{/if}>
70 <dt>
71 <label for="{@$randomFieldNames[email]}">{lang}wcf.user.email{/lang}</label>
72 </dt>
73 <dd>
74 <input type="email" id="{@$randomFieldNames[email]}" name="{@$randomFieldNames[email]}" value="{$email}" required class="medium">
75 {if $errorType.email|isset}
76 <small class="innerError">
77 {if $errorType.email == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
78 {if $errorType.email == 'invalid'}{lang}wcf.user.email.error.invalid{/lang}{/if}
79 {if $errorType.email == 'notUnique'}{lang}wcf.user.email.error.notUnique{/lang}{/if}
80 </small>
81 {/if}
82 </dd>
83 </dl>
84
85 <dl{if $errorType.confirmEmail|isset} class="formError"{/if}>
86 <dt>
87 <label for="{@$randomFieldNames[confirmEmail]}">{lang}wcf.user.confirmEmail{/lang}</label>
88 </dt>
89 <dd>
90 <input type="email" id="{@$randomFieldNames[confirmEmail]}" name="{@$randomFieldNames[confirmEmail]}" value="{$confirmEmail}" required class="medium">
91 {if $errorType.confirmEmail|isset}
92 <small class="innerError">
93 {if $errorType.confirmEmail == 'notEqual'}{lang}wcf.user.confirmEmail.error.notEqual{/lang}{/if}
94 </small>
95 {/if}
96 </dd>
97 </dl>
98
99 {event name='emailFields'}
100 </section>
101
102 {if !$isExternalAuthentication}
103 <section class="section">
104 <h2 class="sectionTitle">{lang}wcf.user.password{/lang}</h2>
105
106 <dl{if $errorType.password|isset} class="formError"{/if}>
107 <dt>
108 <label for="{@$randomFieldNames[password]}">{lang}wcf.user.password{/lang}</label>
109 </dt>
110 <dd>
111 <input type="password" id="{@$randomFieldNames[password]}" name="{@$randomFieldNames[password]}" value="{$password}" required class="medium">
112 {if $errorType.password|isset}
113 <small class="innerError">
114 {if $errorType.password == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
115 {if $errorType.password == 'notSecure'}{lang}wcf.user.password.error.notSecure{/lang}{/if}
116 </small>
117 {/if}
118 <small>{lang}wcf.user.password.description{/lang}</small>
119 </dd>
120 </dl>
121
122 <dl{if $errorType.confirmPassword|isset} class="formError"{/if}>
123 <dt>
124 <label for="{@$randomFieldNames[confirmPassword]}">{lang}wcf.user.confirmPassword{/lang}</label>
125 </dt>
126 <dd>
127 <input type="password" id="{@$randomFieldNames[confirmPassword]}" name="{@$randomFieldNames[confirmPassword]}" value="{$confirmPassword}" required class="medium">
128 {if $errorType.confirmPassword|isset}
129 <small class="innerError">
130 {if $errorType.confirmPassword == 'notEqual'}{lang}wcf.user.confirmPassword.error.notEqual{/lang}{/if}
131 </small>
132 {/if}
133 </dd>
134 </dl>
135
136 {event name='passwordFields'}
137 </section>
138 {/if}
139
140 {if $availableLanguages|count > 1}
141 <section class="section">
142 <h2 class="sectionTitle">{lang}wcf.user.language{/lang}</h2>
143
144 <dl>
145 <dt><label for="languageID">{lang}wcf.user.language{/lang}</label></dt>
146 <dd>
147 <select id="languageID" name="languageID">
148 {foreach from=$availableLanguages item=language}
149 <option value="{@$language->languageID}"{if $language->languageID == $languageID} selected{/if}>{$language}</option>
150 {/foreach}
151 </select>
152 <small>{lang}wcf.user.language.description{/lang}</small>
153 </dd>
154 </dl>
155
156 {hascontent}
157 <dl>
158 <dt><label>{lang}wcf.user.visibleLanguages{/lang}</label></dt>
159 <dd class="floated">
160 {content}
161 {foreach from=$availableContentLanguages item=language}
162 <label><input name="visibleLanguages[]" type="checkbox" value="{@$language->languageID}"{if $language->languageID|in_array:$visibleLanguages} checked{/if}> {$language}</label>
163 {/foreach}
164 {/content}
165 <small>{lang}wcf.user.visibleLanguages.description{/lang}</small></dd>
166 </dl>
167 {/hascontent}
168
169 {event name='languageFields'}
170 </section>
171 {/if}
172
173 {foreach from=$optionTree item=category}
174 <section class="section">
175 <h2 class="sectionTitle">{lang}wcf.user.option.category.{@$category[object]->categoryName}{/lang}</h2>
176
177 {include file='userOptionFieldList' options=$category[options] langPrefix='wcf.user.option.'}
178 </section>
179 {/foreach}
180
181 {event name='sections'}
182
183 {include file='captcha' supportsAsyncCaptcha=true}
184
185 <div class="formSubmit">
186 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
187 {@SECURITY_TOKEN_INPUT_TAG}
188 </div>
189 </form>
190
191 <script data-relocate="true">
192 $(function() {
193 WCF.Language.addObject({
194 'wcf.global.form.error.empty': '{lang}wcf.global.form.error.empty{/lang}',
195 'wcf.user.username.error.invalid': '{lang}wcf.user.username.error.invalid{/lang}',
196 'wcf.user.username.error.notUnique': '{lang}wcf.user.username.error.notUnique{/lang}',
197 'wcf.user.email.error.invalid' : '{lang}wcf.user.email.error.invalid{/lang}',
198 'wcf.user.email.error.notUnique' : '{lang}wcf.user.email.error.notUnique{/lang}',
199 'wcf.user.confirmEmail.error.notEqual' : '{lang}wcf.user.confirmEmail.error.notEqual{/lang}',
200 'wcf.user.password.error.notSecure' : '{lang}wcf.user.password.error.notSecure{/lang}',
201 'wcf.user.confirmPassword.error.notEqual' : '{lang}wcf.user.confirmPassword.error.notEqual{/lang}'
202 });
203
204 new WCF.User.Registration.Validation.EmailAddress($('#{@$randomFieldNames[email]}'), $('#{@$randomFieldNames[confirmEmail]}'), null);
205 new WCF.User.Registration.Validation.Password($('#{@$randomFieldNames[password]}'), $('#{@$randomFieldNames[confirmPassword]}'), null);
206 new WCF.User.Registration.Validation.Username($('#{@$randomFieldNames[username]}'), null, {
207 minlength: {@REGISTER_USERNAME_MIN_LENGTH},
208 maxlength: {@REGISTER_USERNAME_MAX_LENGTH}
209 });
210 });
211 </script>
212
213 {include file='footer' __disableAds=true}