<div class="formSubmit">
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
+ <button id="buttonMessagePreview" class="jsOnly">{lang}wcf.global.button.preview{/lang}</button>
<input type="hidden" name="isMultilingual" value="{@$isMultilingual}">
<input type="hidden" name="timeNowReference" value="{@TIME_NOW}">
{csrfToken}
$(function() {
WCF.Language.addObject({
'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
+ 'wcf.global.preview': '{jslang}wcf.global.preview{/jslang}',
});
{if !$labelGroups|empty}
new WCF.Label.ArticleLabelChooser({ {implode from=$labelGroupsToCategories key=__labelCategoryID item=labelGroupIDs}{@$__labelCategoryID}: [ {implode from=$labelGroupIDs item=labelGroupID}{@$labelGroupID}{/implode} ] {/implode} }, { {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '.articleAddForm');
{/if}
+
+ new WCF.Message.I18nPreview({
+ messageFields: [
+ {if !$isMultilingual}
+ 'content0',
+ {else}
+ {implode from=$availableLanguages item=availableLanguage}'content{$availableLanguage->languageID}'{/implode}
+ {/if}
+ ],
+ messageObjectType: 'com.woltlab.wcf.article.content',
+ messageObjectID: {if $action === 'edit'}{$article->articleID}{else}0{/if}
+ });
});
</script>
<div class="formSubmit">
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
+ <button id="buttonMessagePreview" class="jsOnly">{lang}wcf.global.button.preview{/lang}</button>
<input type="hidden" name="isMultilingual" value="{@$isMultilingual}">
<input type="hidden" name="timeNowReference" value="{@TIME_NOW}">
{csrfToken}
$(function() {
WCF.Language.addObject({
'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
+ 'wcf.global.preview': '{jslang}wcf.global.preview{/jslang}',
});
{if !$labelGroups|empty}
new WCF.Label.ArticleLabelChooser({ {implode from=$labelGroupsToCategories key=__labelCategoryID item=labelGroupIDs}{@$__labelCategoryID}: [ {implode from=$labelGroupIDs item=labelGroupID}{@$labelGroupID}{/implode} ] {/implode} }, { {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '.articleAddForm');
{/if}
+
+ new WCF.Message.I18nPreview({
+ messageFields: [
+ {if !$isMultilingual}
+ 'content0',
+ {else}
+ {implode from=$availableLanguages item=availableLanguage}'content{$availableLanguage->languageID}'{/implode}
+ {/if}
+ ],
+ messageObjectType: 'com.woltlab.wcf.article.content',
+ messageObjectID: {if $action === 'edit'}{$article->articleID}{else}0{/if}
+ });
});
</script>