1 {if $__showPoll|isset && $__showPoll}
2 <script data-relocate="true">
5 WCF.Language.addObject({
6 'wcf.poll.button.addOption': '{lang}wcf.poll.button.addOption{/lang}',
7 'wcf.poll.button.removeOption': '{lang}wcf.poll.button.removeOption{/lang}'
10 new WCF.Poll.Management('pollOptionContainer', [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ], {@POLL_MAX_OPTIONS});
15 <div id="poll" class="jsOnly tabMenuContent container containerPadding">
17 <dl{if $errorField == 'pollOptions'} class="formError"{/if}>
19 <label for="pollQuestion">{lang}wcf.poll.question{/lang}</label>
22 <input type="text" name="pollQuestion" id="pollQuestion" value="{$pollQuestion}" class="long" maxlength="255" />
23 {if $errorField == 'pollQuestion'}
24 <small class="innerError">
25 {lang}wcf.global.form.error.empty{/lang}
30 <label>{lang}wcf.poll.options{/lang}</label>
32 <dd id="pollOptionContainer" class="sortableListContainer">
33 <ol class="sortableList"></ol>
34 {if $errorField == 'pollOptions'}
35 <small class="innerError">
36 {lang}wcf.global.form.error.empty{/lang}
39 <small>{lang}wcf.poll.options.description{/lang}</small>
42 <dl{if $errorField == 'pollEndTime'} class="formError"{/if}>
44 <label for="pollEndTime">{lang}wcf.poll.endTime{/lang}</label>
47 <input type="datetime" name="pollEndTime" id="pollEndTime" value="{if $pollEndTime}{@$pollEndTime|date:'c'}{/if}" class="medium" data-ignore-timezone="true" />
48 {if $errorField == 'pollEndTime'}
49 <small class="innerError">
50 {lang}wcf.poll.endTime.error.{@$errorType}{/lang}
55 <dl{if $errorField == 'pollMaxVotes'} class="formError"{/if}>
57 <label for="pollMaxVotes">{lang}wcf.poll.maxVotes{/lang}</label>
60 <input type="number" name="pollMaxVotes" id="pollMaxVotes" value="{@$pollMaxVotes}" min="1" class="tiny" />
61 {if $errorField == 'pollMaxVotes'}
62 <small class="innerError">
63 {lang}wcf.poll.maxVotes.error.{@$errorType}{/lang}
71 <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked="checked"{/if} /> {lang}wcf.poll.isChangeable{/lang}</label>
73 {if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
75 <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked="checked"{/if} /> {lang}wcf.poll.isPublic{/lang}</label>
79 <label><input type="checkbox" name="pollResultsRequireVote" value="1"{if $pollResultsRequireVote} checked="checked"{/if} /> {lang}wcf.poll.resultsRequireVote{/lang}</label>
80 <small>{lang}wcf.poll.resultsRequireVote.description{/lang}</small>
83 <label><input type="checkbox" name="pollSortByVotes" value="1"{if $pollSortByVotes} checked="checked"{/if} /> {lang}wcf.poll.sortByVotes{/lang}</label>