<!DOCTYPE html>
<!--
Copyright (C) 2016 Sebastian Pipping <sebastian@pipping.org>
Licensed under GNU GPL v3 or later

{% load static %}
-->
<html 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="{% static '3rdparty/jquery-3.5.1/jquery-3.5.1.min.js' %}"></script>

        <link rel="stylesheet" href="{% static '3rdparty/roboto-20/css/roboto.css' %}">
        <link rel="stylesheet" href="{% static '3rdparty/materialize-1.0.0/css/materialize.min.css' %}">
        <script src="{% static '3rdparty/materialize-1.0.0/js/materialize.min.js' %}"></script>

        <script type="text/javascript" src="{% static 'js/html.js' %}?sha1=c1fe4690fa614be0708cb5ecc74e82f5cb058084"></script>
        <script type="text/javascript" src="{% static 'js/poll.js' %}?sha1=954917ae1af0215991c93374d8e1decb7d587c24"></script>
        <script type="text/javascript" src="{% static 'js/setup.js' %}?sha1=ab0fec13180da6f57ac5f1e778157b6ac26039dd"></script>
        <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}?sha1=6a800a3f645fe42576b63a2e41e1461710cd0382">
    </head>
    <body>
        <div id='stage'>
            <div id='preview'>
                <div id='poll'></div>
            </div>
            <div id='setup'>
                <div class="card-panel">
                    <form id='setupForm' action="{% url 'poll-creation' %}" 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>
                        <div id="setupButtons">
                            <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 btn-flat">Reset</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <footer>
            {% include 'html/footer.htm' %}
        </footer>
    </body>
</html>
