<ol class="sortableList"></ol>
<script data-relocate="true">
- require(['Dom/Traverse', 'Dom/Util', 'Language', 'WoltLabSuite/Core/Ui/Poll/Editor'], function(DomTraverse, DomUtil, Language, UiPollEditor) {
+ require([
+ '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': '{lang}wcf.poll.button.addOption{/lang}',
- 'wcf.poll.button.removeOption': '{lang}wcf.poll.button.removeOption{/lang}',
- 'wcf.poll.maxVotes.error.invalid': '{lang}wcf.poll.maxVotes.error.invalid{/lang}'
+ '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}'
});
- new UiPollEditor(
+ var pollEditor = new UiPollEditor(
DomUtil.identify(DomTraverse.childByTag(elById('{@$field->getPrefixedId()}Container'), 'DD')),
[ {implode from=$field->getValue() item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
'{@$field->getPrefixedWysiwygId()}',
<ol class="sortableList"></ol>
<script data-relocate="true">
- require(['Dom/Traverse', 'Dom/Util', 'Language', 'WoltLabSuite/Core/Ui/Poll/Editor'], function(DomTraverse, DomUtil, Language, UiPollEditor) {
+ require([
+ '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': '{lang}wcf.poll.button.addOption{/lang}',
- 'wcf.poll.button.removeOption': '{lang}wcf.poll.button.removeOption{/lang}',
- 'wcf.poll.maxVotes.error.invalid': '{lang}wcf.poll.maxVotes.error.invalid{/lang}'
+ '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}'
});
- new UiPollEditor(
+ var pollEditor = new UiPollEditor(
DomUtil.identify(DomTraverse.childByTag(elById('{@$field->getPrefixedId()}Container'), 'DD')),
[ {implode from=$field->getValue() item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
'{@$field->getPrefixedWysiwygId()}',