| 1 | {include file='userMenuSidebar'} |
| 2 | |
| 3 | {include file='header' __disableAds=true __sidebarLeftHasMenu=true} |
| 4 | |
| 5 | {include file='shared_formError'} |
| 6 | |
| 7 | {if $success|isset} |
| 8 | <woltlab-core-notice type="success">{lang}wcf.global.success.edit{/lang}</woltlab-core-notice> |
| 9 | {/if} |
| 10 | |
| 11 | {if $__wcf->user->disableSignature} |
| 12 | <woltlab-core-notice type="error">{lang}wcf.user.signature.error.disabled{/lang}</woltlab-core-notice> |
| 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 messageSignatureConstraints">{@$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 class="messageSignatureConstraints"> |
| 31 | <textarea id="text" class="wysiwygTextarea" name="text" rows="20" cols="40" |
| 32 | data-disable-media="true" |
| 33 | >{$text}</textarea> |
| 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> |
| 51 | |
| 52 | {event name='fields'} |
| 53 | </section> |
| 54 | |
| 55 | {event name='sections'} |
| 56 | |
| 57 | {include file='messageFormTabs'} |
| 58 | {/if} |
| 59 | |
| 60 | {if !$__wcf->user->disableSignature} |
| 61 | <div class="formSubmit"> |
| 62 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
| 63 | <button type="button" id="previewButton" class="button jsOnly" accesskey="p">{lang}wcf.global.button.preview{/lang}</button> |
| 64 | {csrfToken} |
| 65 | </div> |
| 66 | {/if} |
| 67 | </form> |
| 68 | |
| 69 | <script data-relocate="true"> |
| 70 | $(function() { |
| 71 | WCF.Language.addObject({ |
| 72 | 'wcf.global.preview': '{jslang}wcf.global.preview{/jslang}' |
| 73 | }); |
| 74 | |
| 75 | new WCF.User.SignaturePreview('wcf\\data\\user\\UserProfileAction', 'text', 'previewButton'); |
| 76 | }); |
| 77 | </script> |
| 78 | |
| 79 | {include file='shared_wysiwyg'} |
| 80 | {include file='footer' __disableAds=true} |