From: Alexander Ebert Date: Fri, 28 Apr 2023 13:29:33 +0000 (+0200) Subject: Migrate the inline poll management to the newer API X-Git-Tag: 6.0.0_Alpha_1~172^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5871d597b5d48b1c36514fab566886e6ac05cd46;p=GitHub%2FWoltLab%2FWCF.git Migrate the inline poll management to the newer API --- diff --git a/com.woltlab.wcf/templates/__messageFormPoll.tpl b/com.woltlab.wcf/templates/__messageFormPoll.tpl index 66c410fe78..12b5e0665f 100644 --- a/com.woltlab.wcf/templates/__messageFormPoll.tpl +++ b/com.woltlab.wcf/templates/__messageFormPoll.tpl @@ -1,17 +1,17 @@ {if $__showPoll|isset && $__showPoll} @@ -20,10 +21,10 @@
- +
- +
@@ -35,36 +36,36 @@
- +
- +
- +
- +
- +
{if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
- +
{/if}
- + {lang}wcf.poll.resultsRequireVote.description{/lang}
- +
diff --git a/com.woltlab.wcf/templates/__pollOptionsFormField.tpl b/com.woltlab.wcf/templates/__pollOptionsFormField.tpl index fb9000d34c..c7a4d94350 100644 --- a/com.woltlab.wcf/templates/__pollOptionsFormField.tpl +++ b/com.woltlab.wcf/templates/__pollOptionsFormField.tpl @@ -5,15 +5,13 @@ 'Dom/Traverse', 'Dom/Util', 'EventHandler', - 'Language', 'WoltLabSuite/Core/Form/Builder/Manager', 'WoltLabSuite/Core/Ui/Poll/Editor' - ], function(DomTraverse, DomUtil, EventHandler, Language, FormBuilderManager, UiPollEditor) { - Language.addObject({ - 'wcf.poll.button.addOption': '{jslang}wcf.poll.button.addOption{/jslang}', - 'wcf.poll.button.removeOption': '{jslang}wcf.poll.button.removeOption{/jslang}', - 'wcf.poll.maxVotes.error.invalid': '{jslang}wcf.poll.maxVotes.error.invalid{/jslang}' - }); + ], (DomTraverse, DomUtil, EventHandler, FormBuilderManager, UiPollEditor) => { + {jsphrase name='wcf.poll.button.addOption'} + {jsphrase name='wcf.poll.button.removeOption'} + {jsphrase name='wcf.poll.endTime.error.invalid'} + {jsphrase name='wcf.poll.maxVotes.error.invalid'} var pollEditor = new UiPollEditor( DomUtil.identify(DomTraverse.childByTag(elById('{@$field->getPrefixedId()|encodeJS}Container'), 'DD')), @@ -21,7 +19,7 @@ '{@$field->getPrefixedWysiwygId()}', { isAjax: {if $field->getDocument()->isAjax()}true{else}false{/if}, - maxOptions: {@POLL_MAX_OPTIONS} + maxOptions: {POLL_MAX_OPTIONS} } );