Merge branch '5.3'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / __messageFormPollInline.tpl
CommitLineData
50188033
AE
1{if $__showPoll|isset && $__showPoll}
2 <script data-relocate="true">
50188033
AE
3 $(function() {
4 WCF.Language.addObject({
e2e8c155
MW
5 'wcf.poll.button.addOption': '{jslang}wcf.poll.button.addOption{/jslang}',
6 'wcf.poll.button.removeOption': '{jslang}wcf.poll.button.removeOption{/jslang}',
7 'wcf.poll.endTime.error.invalid': '{jslang}wcf.poll.endTime.error.invalid{/jslang}',
8 'wcf.poll.maxVotes.error.invalid': '{jslang}wcf.poll.maxVotes.error.invalid{/jslang}'
50188033
AE
9 });
10
11 new WCF.Poll.Management(
12 'pollOptionContainer_{$wysiwygSelector}',
13 [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
14 {@POLL_MAX_OPTIONS},
15 '{$wysiwygSelector}'
16 );
17 });
50188033
AE
18 </script>
19
20 <div class="jsOnly messageTabMenuContent">
21 <dl>
22 <dt>
23 <label for="pollQuestion_{$wysiwygSelector}">{lang}wcf.poll.question{/lang}</label>
24 </dt>
25 <dd>
26 <input type="text" name="pollQuestion" id="pollQuestion_{$wysiwygSelector}" value="{$pollQuestion}" class="long" maxlength="255">
27 </dd>
28 <dt>
29 <label>{lang}wcf.poll.options{/lang}</label>
30 </dt>
31 <dd id="pollOptionContainer_{$wysiwygSelector}" class="pollOptionContainer sortableListContainer">
32 <ol class="sortableList"></ol>
33 <small>{lang}wcf.poll.options.description{/lang}</small>
34 </dd>
35 </dl>
36 <dl>
37 <dt>
38 <label for="pollEndTime_{$wysiwygSelector}">{lang}wcf.poll.endTime{/lang}</label>
39 </dt>
40 <dd>
371aadfd 41 <input type="datetime" tabindex="-1" name="pollEndTime" id="pollEndTime_{$wysiwygSelector}" value="{if $pollEndTime}{@$pollEndTime|date:'c'}{/if}" class="medium">
50188033
AE
42 </dd>
43 </dl>
44 <dl>
45 <dt>
46 <label for="pollMaxVotes_{$wysiwygSelector}">{lang}wcf.poll.maxVotes{/lang}</label>
47 </dt>
48 <dd>
49 <input type="number" name="pollMaxVotes" id="pollMaxVotes_{$wysiwygSelector}" value="{@$pollMaxVotes}" min="1" class="tiny">
50 </dd>
51 </dl>
52 <dl>
53 <dt></dt>
54 <dd>
55 <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked{/if}> {lang}wcf.poll.isChangeable{/lang}</label>
56 </dd>
57 {if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
58 <dd>
59 <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked{/if}> {lang}wcf.poll.isPublic{/lang}</label>
60 </dd>
61 {/if}
62 <dd>
63 <label><input type="checkbox" name="pollResultsRequireVote" value="1"{if $pollResultsRequireVote} checked{/if}> {lang}wcf.poll.resultsRequireVote{/lang}</label>
64 <small>{lang}wcf.poll.resultsRequireVote.description{/lang}</small>
65 </dd>
66 <dd>
67 <label><input type="checkbox" name="pollSortByVotes" value="1"{if $pollSortByVotes} checked{/if}> {lang}wcf.poll.sortByVotes{/lang}</label>
68 </dd>
69 </dl>
70
71 {event name='fields'}
72 </div>
e2e8c155 73{/if}