pollthingy/resources/views/create_poll.blade.php

100 lines
4.2 KiB
PHP
Raw Normal View History

@extends('layouts.app')
@section('title', 'Create a Poll')
@section('content')
<form action="{{ action('PollController@create') }}" method="post">
@csrf
<!-- TODO: Get rid of <br>s -->
2018-10-12 18:54:48 +02:00
<section class="grid grid--large">
<div class="textfield">
2018-10-18 22:52:19 +02:00
<span class="text-browser">Question:<br></span>
2018-10-12 18:54:48 +02:00
<input type="text" class="question" name="question" placeholder="Type your question here" required>
</div>
</section>
2018-10-12 18:54:48 +02:00
<br>
2018-10-17 16:56:05 +02:00
<section>
2018-10-18 22:52:19 +02:00
<span class="text-browser">Options:<br></span>
2018-10-17 16:56:05 +02:00
@for ($i = 0; $i < 5; $i++)
<div class="grid grid--large">
<div class="textfield">
<input type="text" class="option" name="options[]" placeholder="Enter a poll option" @if($i == 0 ) required @endif>
</div>
<div class="textfield">
<input type="text" class="option" name="options[]" placeholder="Enter a poll option" @if($i == 0 ) required @endif>
</div>
<div class="textfield">
<input type="text" class="option" name="options[]" placeholder="Enter a poll option">
</div>
2018-10-16 04:28:44 +02:00
</div>
2018-10-17 16:56:05 +02:00
@endfor
2018-10-18 22:52:19 +02:00
<div class="text-browser"><br></div>
2018-10-17 16:56:05 +02:00
</section>
2018-10-12 18:54:48 +02:00
<section class="grid grid--large">
<div class="some-top-margin">
<label class="checkbox no-bottom-margin">
2018-10-16 03:23:19 +02:00
<input type="checkbox" name="allow_multiple_answers">
2018-10-12 18:54:48 +02:00
<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>
2018-10-12 18:54:48 +02:00
<label class="checkbox no-bottom-margin">
<input type="checkbox" name="automatically_close_poll">
<span class="checkbox__label">Automatically close poll at </span>
<input type="datetime-local" name="automatically_close_poll_datetime" class="inline-block" value="{{ Carbon\Carbon::now()->addHour()->format('Y-m-d\TH:i') }}" min="{{ Carbon\Carbon::now()->format('Y-m-d\TH:i') }}">
</label>
<br>
<label class="checkbox no-bottom-margin">
<input type="checkbox" name="set_admin_password">
2018-10-12 18:54:48 +02:00
<span class="checkbox__label">Set an admin password: </span>
<input type="text" name="admin_password" class="inline-text">
</label>
2018-10-18 22:52:19 +02:00
<div class="text-browser"><br></div>
2018-10-12 18:54:48 +02:00
</div>
<div class="some-top-margin">
<div class="some-bottom-margin">
<span>Duplicate vote checking:</span>
</div>
<label class="radio no-bottom-margin">
<input type="radio" name="duplicate_vote_checking" value="none" checked>
<span class="radio__label">None</span>
</label>
<br>
<label class="radio no-bottom-margin">
<input type="radio" name="duplicate_vote_checking" value="cookies">
<span class="radio__label">Browser cookies</span>
</label>
<br>
<label class="radio no-bottom-margin">
<input type="radio" name="duplicate_vote_checking" value="codes">
<span class="radio__label">Voting codes</span>
</label>
<br>
<label class="number">
<input type="number" min="2" max="1000" value="10" name="number_of_codes">
<span class="radio__label">codes</span>
</label>
</div>
</section>
2018-10-18 22:52:19 +02:00
<div class="text-browser"><br></div>
<section>
<input type="submit" class="btn" value="Create poll">
</section>
</form>
@endsection