Commit 823eda88 authored by Tino Goratsch's avatar Tino Goratsch

use the ajax-form layout for the polls vote controller action

parent ef6e29bb
{extends file="asset:`$LAYOUT`"}
{extends file="asset:System/ajax-form.tpl"}
{block CONTENT}
<form action="{$REQUEST_URI}" method="post" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="answer-{$answers.0.id}" class="col-sm-2 control-label">{$question}</label>
{block AJAX_FORM_CONTENT}
<div class="form-group">
<label for="answer-{$answers.0.id}" class="col-sm-2 control-label">{$question}</label>
<div class="col-sm-10">
{foreach $answers as $row}
{if $multiple == '1'}
<div class="checkbox">
<label for="answer-{$row.id}">
<input type="checkbox" name="answer[]" id="answer-{$row.id}" value="{$row.id}">
{$row.text}
</label>
</div>
{else}
<div class="radio">
<label for="answer-{$row.id}">
<input type="radio" name="answer" id="answer-{$row.id}" value="{$row.id}">
{$row.text}
</label>
</div>
{/if}
{/foreach}
</div>
<div class="col-sm-10">
{foreach $answers as $row}
{if $multiple == '1'}
<div class="checkbox">
<label for="answer-{$row.id}">
<input type="checkbox" name="answer[]" id="answer-{$row.id}" value="{$row.id}">
{$row.text}
</label>
</div>
{else}
<div class="radio">
<label for="answer-{$row.id}">
<input type="radio" name="answer" id="answer-{$row.id}" value="{$row.id}">
{$row.text}
</label>
</div>
{/if}
{/foreach}
</div>
{include file="asset:System/Partials/form_group.submit.tpl"}
</form>
{javascripts}
{include_js module="system" file="ajax-form"}
{/javascripts}
</div>
{include file="asset:System/Partials/form_group.submit.tpl"}
{/block}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment