<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<!--
Copyright (C) 2016 Sebastian Pipping <sebastian@pipping.org>
Licensed under GNU GPL v3 or later
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>jawanndenn: Create a new poll</title>

        <meta name="viewport" content="width=device-width, initial-scale=1" />

        <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" />

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css" />
        <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.min.js" />

        <script type="text/javascript" src="{{ url_prefix|safe }}/static/js/html.js?sha1=85e9e5f0be4160539a04f4af533093f1616820f6" />
        <script type="text/javascript" src="{{ url_prefix|safe }}/static/js/poll.js?sha1=5342f6f12026a4027a2cc70eed0e79736323f6a6" />
        <script type="text/javascript" src="{{ url_prefix|safe }}/static/js/setup.js?sha1=b1e8f3b100cd3fc16c649890575c62c66ff70d2b" />
        <link rel="stylesheet" type="text/css" href="{{ url_prefix|safe }}/static/css/style.css?sha1=a024ed989079086c9e2ba073a8f7787e180eb508" />
    </head>
    <body>
        <div id='stage'>
            <div id='preview'>
                <div id='poll' />
            </div>
            <div id='setup'>
                <div class="card-panel">
                    <form id='setupForm' action="{{ url_prefix|safe }}/create" method="POST">
                        <input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" />
                        <div class="input-field">
                            <textarea id="config" name="config" class="materialize-textarea monospace-text"></textarea>
                            <label for="config">Setup (JSON)</label>
                        </div>
                        <button type="submit" id='createButton' onclick="$( '#setupForm' ).submit();" class="waves-effect waves-light btn" disabled="disabled">Create</button>
                        <button type="button" id='resetButton' onclick="resetConfig();" class="waves-effect waves-light btn-flat">Reset</button>
                    </form>
                </div>
            </div>
        </div>
        <footer />
    </body>
</html>
