Add option to hide results until poll is closed

This commit is contained in:
Les De Ridder 2018-10-12 19:34:05 +02:00
parent 41bc4f6875
commit 1c300657d6
2 changed files with 9 additions and 1 deletions

View File

@ -18,6 +18,7 @@ class CreatePollsTable extends Migration
$table->string('question');
$table->enum('duplicate_vote_checking', ['none', 'cookies', 'codes']);
$table->boolean('allow_multiple_answers');
$table->boolean('hide_results_until_closed');
$table->timestamp('created_at');
$table->timestamp('closes_at')->nullable();
$table->string('admin_password')->nullable();

View File

@ -6,6 +6,8 @@
<form action="{{ action('PollController@create') }}" method="post">
@csrf
<!-- TODO: Get rid of <br>s -->
<section class="grid grid--large">
<div class="textfield">
<input type="text" class="question" name="question" placeholder="Type your question here" required>
@ -35,6 +37,11 @@
<span class="checkbox__label">Allow multiple answers</span>
</label>
<br>
<label class="checkbox no-bottom-margin">
<input type="checkbox" name="hide_results_until_closed">
<span class="checkbox__label">Hide results until poll is closed</span>
</label>
<br>
<label class="checkbox no-bottom-margin">
<input type="checkbox" name="automatically_close_poll">
<span class="checkbox__label">Automatically close poll at </span>
@ -42,7 +49,7 @@
</label>
<br>
<label class="checkbox no-bottom-margin">
<input type="checkbox" name="set_admin_password" checked=off>
<input type="checkbox" name="set_admin_password">
<span class="checkbox__label">Set an admin password: </span>
<input type="text" name="admin_password" class="inline-text">
<span class="post-input-label"></span>