Updating minified JavaScript files
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / __messageFormPoll.tpl
CommitLineData
e25b7b61 1{if $__showPoll|isset && $__showPoll}
b3aa13b6
SG
2 <script src="{@$__wcf->getPath()}js/WCF.Poll{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
3 <script>
e25b7b61
MW
4 //<![CDATA[
5 $(function() {
6 WCF.Language.addObject({
7 'wcf.poll.button.addOption': '{lang}wcf.poll.button.addOption{/lang}',
8 'wcf.poll.button.removeOption': '{lang}wcf.poll.button.removeOption{/lang}'
9 });
10
67429cfa 11 new WCF.Poll.Management('pollOptionContainer', [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]}' }{/implode} ], {@POLL_MAX_OPTIONS});
e25b7b61
MW
12 });
13 //]]>
14 </script>
15
16 <div id="poll" class="jsOnly tabMenuContent container containerPadding">
17 <fieldset>
18 <dl{if $errorField == 'pollOptions'} class="formError"{/if}>
19 <dt>
20 <label for="pollQuestion">{lang}wcf.poll.question{/lang}</label>
21 </dt>
22 <dd>
23 <input type="text" name="pollQuestion" id="pollQuestion" value="{$pollQuestion}" class="long" />
24 </dd>
25 <dt>
26 <label>{lang}wcf.poll.options{/lang}</label>
27 </dt>
28 <dd id="pollOptionContainer" class="sortableListContainer">
29 <ol class="sortableList"></ol>
30 {if $errorField == 'pollOptions'}
31 <small class="innerError">
32 {lang}wcf.global.form.error.empty{/lang}
33 </small>
34 {/if}
35 <small>{lang}wcf.poll.options.description{/lang}</small>
36 </dd>
37 </dl>
38 <dl>
39 <dt{if $errorField == 'pollEndTime'} class="formError"{/if}>
40 <label for="pollEndTime">{lang}wcf.poll.endTime{/lang}</label>
41 </dt>
42 <dd>
fb5fdb90 43 <input type="datetime" name="pollEndTime" id="pollEndTime" value="{if $pollEndTime}{@$pollEndTime|date:'Y-m-d H:i'}{/if}" />
e25b7b61
MW
44 {if $errorField == 'pollEndTime'}
45 <small class="innerError">
46 {lang}wcf.poll.endTime.error.{@$errorType}{/lang}
47 </small>
48 {/if}
49 </dd>
50 </dl>
51 <dl{if $errorField == 'pollMaxVotes'} class="formError"{/if}>
52 <dt>
53 <label for="pollMaxVotes">{lang}wcf.poll.maxVotes{/lang}</label>
54 </dt>
55 <dd>
56 <input type="number" name="pollMaxVotes" id="pollMaxVotes" value="{@$pollMaxVotes}" min="1" class="tiny" />
57 {if $errorField == 'pollMaxVotes'}
58 <small class="innerError">
59 {lang}wcf.poll.maxVotes.error.{@$errorType}{/lang}
60 </small>
61 {/if}
62 </dd>
63 <dd>
64 <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked="checked"{/if} /> {lang}wcf.poll.isChangeable{/lang}</label>
65 </dd>
66 {if !$pollID}
67 <dd>
68 <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked="checked"{/if} /> {lang}wcf.poll.isPublic{/lang}</label>
69 </dd>
70 {/if}
71 <dd>
72 <label><input type="checkbox" name="pollResultsRequireVote" value="1"{if $pollResultsRequireVote} checked="checked"{/if} /> {lang}wcf.poll.resultsRequireVote{/lang}</label>
73 <small>{lang}wcf.poll.resultsRequireVote.description{/lang}</small>
74 </dd>
75 <dd>
76 <label><input type="checkbox" name="pollSortByVotes" value="1"{if $pollSortByVotes} checked="checked"{/if} /> {lang}wcf.poll.sortByVotes{/lang}</label>
77 </dd>
78 </dl>
79
80 {event name='fields'}
81 </fieldset>
82 </div>
83{/if}