{% extends "base.html" %}

{% block page_content %}

    {% from "_formhelpers.html" import render_field %}
    <style>
     ul{
         float: left;
     }
    </style>

    <div class="card">
        <div class="card-body">
            <div id="passcodesection">
                <h3 data-toggle="tooltip" title="Enter passcode set at runtime" class="text-center"> Enter Passcode </h3>
                <form method="post" id="passcodeform" action="verifyPasscode">
                    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
                    {{ render_field(verifyform.passcode) }}
                    <span class="input-group-btn">
                                <input type="button" id="btnPasscode"
                                       name="general_search_button" value="Submit"
                                       class="btn btn-theme-colored btn-lg m-0" title="Verify passcode"
                                       style="font-weight: bold; height: 45px;">
                    </span>
                </form>
            </div>
            <div id="mongoconnection" style="display: none;">
                <h3 data-toggle="tooltip" title="Connect to a mongo database" class="text-center"> Connect to Mongo Database </h3>
                <form method="post" action="admin">
                    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
                    {{ render_field(form.hostname) }}
                    {{ render_field(form.port) }}
                    {{ render_field(form.username) }}
                    {{ render_field(form.password) }}
                    {{ render_field(form.dbname) }}
                    {{ render_field(form.collection) }}
                    {{ render_field(form.isSSL) }}
                    <span class="input-group-btn">
                                <input type="submit" id="btnExplorer"
                                       name="general_search_button" value="Connect"
                                       class="btn btn-theme-colored btn-lg m-0" title="Start from scratch."
                                       style="font-weight: bold; height: 45px;">
                    </span>
                </form>
            </div>
        </div>
    </div>
        <script src="{{ url_for('static', filename='./javascript/modules/admin.js') }}"></script>
        <script type="text/javascript">
        window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
        ga('create', 'UA-126882431-1', 'auto');
        ga('send', 'pageview');
    </script>
    <script async src='https://www.google-analytics.com/analytics.js'> </script>


{% endblock %}