Commit | Line | Data |
---|---|---|
320f4a6d MW |
1 | {include file='userMenuSidebar'} |
2 | ||
524f0f91 | 3 | {include file='header' __disableAds=true __sidebarLeftHasMenu=true} |
320f4a6d | 4 | |
b54fdcc0 | 5 | {include file='shared_formError'} |
320f4a6d MW |
6 | |
7 | {if $success|isset} | |
a14d7068 | 8 | <woltlab-core-notice type="success">{lang}wcf.global.success.edit{/lang}</woltlab-core-notice> |
320f4a6d MW |
9 | {/if} |
10 | ||
11 | {if $__wcf->user->disableSignature} | |
a14d7068 | 12 | <woltlab-core-notice type="error">{lang}wcf.user.signature.error.disabled{/lang}</woltlab-core-notice> |
320f4a6d MW |
13 | {/if} |
14 | ||
320f4a6d | 15 | <form method="post" action="{link controller='SignatureEdit'}{/link}"> |
95961bdf MW |
16 | {if $signatureCache} |
17 | <section class="section"> | |
18 | <h2 class="sectionTitle">{lang}wcf.user.signature.current{/lang}</h2> | |
320f4a6d | 19 | |
e3ac253a | 20 | <div class="htmlContent messageSignatureConstraints">{@$signatureCache}</div> |
95961bdf MW |
21 | </section> |
22 | {/if} | |
23 | ||
24 | {if !$__wcf->user->disableSignature} | |
25 | <section class="section" id="signatureContainer"> | |
26 | <h2 class="sectionTitle">{lang}wcf.user.signature{/lang}</h2> | |
27 | ||
28 | <dl class="wide{if $errorField == 'text'} formError{/if}"> | |
29 | <dt><label for="text">{lang}wcf.user.signature{/lang}</label></dt> | |
e3ac253a | 30 | <dd class="messageSignatureConstraints"> |
0e1a9950 | 31 | <textarea id="text" class="wysiwygTextarea" name="text" rows="20" cols="40" |
959ada16 | 32 | data-disable-media="true" |
0e1a9950 | 33 | >{$text}</textarea> |
95961bdf MW |
34 | {if $errorField == 'text'} |
35 | <small class="innerError"> | |
36 | {if $errorType == 'empty'} | |
37 | {lang}wcf.global.form.error.empty{/lang} | |
38 | {elseif $errorType == 'tooLong'} | |
39 | {lang}wcf.message.error.tooLong{/lang} | |
40 | {elseif $errorType == 'censoredWordsFound'} | |
41 | {lang}wcf.message.error.censoredWordsFound{/lang} | |
42 | {elseif $errorType == 'disallowedBBCodes'} | |
43 | {lang}wcf.message.error.disallowedBBCodes{/lang} | |
44 | {else} | |
45 | {lang}wcf.user.signature.error.{@$errorType}{/lang} | |
46 | {/if} | |
47 | </small> | |
48 | {/if} | |
49 | </dd> | |
50 | </dl> | |
320f4a6d | 51 | |
95961bdf MW |
52 | {event name='fields'} |
53 | </section> | |
54 | ||
55 | {event name='sections'} | |
56 | ||
57 | {include file='messageFormTabs'} | |
58 | {/if} | |
320f4a6d MW |
59 | |
60 | {if !$__wcf->user->disableSignature} | |
61 | <div class="formSubmit"> | |
e5f9b56c | 62 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
eecd78e1 | 63 | <button type="button" id="previewButton" class="button jsOnly" accesskey="p">{lang}wcf.global.button.preview{/lang}</button> |
bb3d4ee5 | 64 | {csrfToken} |
320f4a6d MW |
65 | </div> |
66 | {/if} | |
67 | </form> | |
68 | ||
3e93caf9 | 69 | <script data-relocate="true"> |
3e93caf9 MW |
70 | $(function() { |
71 | WCF.Language.addObject({ | |
e2e8c155 | 72 | 'wcf.global.preview': '{jslang}wcf.global.preview{/jslang}' |
3e93caf9 MW |
73 | }); |
74 | ||
75 | new WCF.User.SignaturePreview('wcf\\data\\user\\UserProfileAction', 'text', 'previewButton'); | |
76 | }); | |
3e93caf9 | 77 | </script> |
320f4a6d | 78 | |
b54fdcc0 | 79 | {include file='shared_wysiwyg'} |
b3463f2a | 80 | {include file='footer' __disableAds=true} |