Merge remote-tracking branch 'refs/remotes/origin/3.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / signatureEdit.tpl
1 {include file='userMenuSidebar'}
2
3 {include file='header' __disableAds=true}
4
5 {include file='formError'}
6
7 {if $success|isset}
8 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
9 {/if}
10
11 {if $__wcf->user->disableSignature}
12 <p class="error">{lang}wcf.user.signature.error.disabled{/lang}</p>
13 {/if}
14
15 <form method="post" action="{link controller='SignatureEdit'}{/link}">
16 {if $signatureCache}
17 <section class="section">
18 <h2 class="sectionTitle">{lang}wcf.user.signature.current{/lang}</h2>
19
20 <div class="htmlContent">{@$signatureCache}</div>
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>
30 <dd>
31 <textarea id="text" class="wysiwygTextarea" name="text" rows="20" cols="40"
32 data-disable-attachments="true"
33 data-disable-media="true"
34 >{$text}</textarea>
35 {if $errorField == 'text'}
36 <small class="innerError">
37 {if $errorType == 'empty'}
38 {lang}wcf.global.form.error.empty{/lang}
39 {elseif $errorType == 'tooLong'}
40 {lang}wcf.message.error.tooLong{/lang}
41 {elseif $errorType == 'censoredWordsFound'}
42 {lang}wcf.message.error.censoredWordsFound{/lang}
43 {elseif $errorType == 'disallowedBBCodes'}
44 {lang}wcf.message.error.disallowedBBCodes{/lang}
45 {else}
46 {lang}wcf.user.signature.error.{@$errorType}{/lang}
47 {/if}
48 </small>
49 {/if}
50 </dd>
51 </dl>
52
53 {event name='fields'}
54 </section>
55
56 {event name='sections'}
57
58 {include file='messageFormTabs'}
59 {/if}
60
61 {if !$__wcf->user->disableSignature}
62 <div class="formSubmit">
63 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
64 <button id="previewButton" class="jsOnly" accesskey="p">{lang}wcf.global.button.preview{/lang}</button>
65 {@SECURITY_TOKEN_INPUT_TAG}
66 </div>
67 {/if}
68 </form>
69
70 <script data-relocate="true">
71 $(function() {
72 WCF.Language.addObject({
73 'wcf.global.preview': '{lang}wcf.global.preview{/lang}'
74 });
75
76 new WCF.User.SignaturePreview('wcf\\data\\user\\UserProfileAction', 'text', 'previewButton');
77 });
78 </script>
79
80 {include file='wysiwyg'}
81 {include file='footer' __disableAds=true}