1
0
mirror of https://git.cant.at/Madeorsk/PollVerlaine synced 2024-12-22 11:57:55 +01:00
PollVerlaine/views/poll.php

14 lines
703 B
PHP
Raw Permalink Normal View History

<h1 class="poll"><?= $poll->title ?></h1>
2018-08-12 14:30:38 +02:00
<main>
2018-08-26 12:04:29 +02:00
<form action="<?= $app_url ?>/polls/<?= $poll->id ?>/vote" method="POST" id="poll">
2018-08-13 14:51:21 +02:00
<?php foreach ($poll->options as $id => $option): ?>
<div class="option">
<input type="<?= $poll->settings->multiple_choices ? "checkbox" : "radio" ?>" name="options[]" value="<?= $id ?>" id="option-<?= $id ?>" />
2018-08-13 14:51:21 +02:00
<label for="option-<?= $id ?>" class="check"></label>
2019-05-04 11:53:21 +02:00
<label for="option-<?= $id ?>"><?= htmlspecialchars($option->label) ?></label>
</div>
<?php endforeach; ?>
<input type="submit" value="Vote" />
</form>
2018-08-26 12:04:29 +02:00
<a class="button margin" href="<?= $app_url ?>/polls/<?= $poll->id ?>/results">Jump to results</a>
2018-08-12 14:30:38 +02:00
</main>