Sync the templates for the poll options form field
authorAlexander Ebert <ebert@woltlab.com>
Fri, 28 Apr 2023 14:32:01 +0000 (16:32 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 28 Apr 2023 14:32:01 +0000 (16:32 +0200)
wcfsetup/install/files/acp/templates/__pollOptionsFormField.tpl

index fb9000d34cfd818cca626a87852c660ce25c454f..c7a4d94350fffc627cbe4ea3350b7b34313e6341 100644 (file)
@@ -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}
                        }
                );