... | in poll.naml |
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
|
<macro name="poll" requires="node">
<n.comment.>
Builds the poll interface. Since some options depend on the current visitor, we use javascript
to set up some fields. Please look at the "poll_js" macro in order to understand how this poll UI is updated.
</n.comment.>
<n.if.has_poll>
<then>
<form method="POST" id="poll_form[n.id/]" onsubmit="return Nabble.vote([n.id/],[n.poll_max_choices/]);" accept-charset="UTF-8" >
<input type="hidden" name="node" value="[n.id/]" />
<div class="medium-border-color border2 rounded" style="margin-top:1em;padding:1em">
<div class="big-title second-font">
<n.encode.poll_question/>
</div>
<n.explain_poll_max_choices/>
<n.poll_option_list.loop.>
<div style="margin:.4em 0 0 1em">
<span id="poll-option-input[n.option_id/]"></span>
<label for="option[n.option_id/]"><n.encode.current_string/></label>
<span id="poll-vote-count[n.option_id/]" class="weak-color" style="font-size:80%"></span>
</div>
</n.poll_option_list.loop.>
<div style="margin-top:.7em">
<n.poll_submit_button/>
<n.poll_total_votes/>
</div>
<n.poll_description_lines/>
</div>
</form>
<n.call_later value="[n.id/]" param="poll_node_id"/>
</then>
</n.if.has_poll>
</macro>
|