<!DOCTYPE html>
<html lang="fi">
<head>
    {% load staticfiles i18n %}

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>{% trans '2-Factor Authentication' %}</title>

    <!-- Bootstrap Core CSS -->
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .login-panel {
          margin-top: 25%;
        }
    </style>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>


<div class="container">
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <div class="login-panel panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">{% trans '2-Factor Authentication' %}</h3>
                </div>
                <div class="panel-body">

                    <form action="" method="post" role="form">
                        {% csrf_token %}
                        <fieldset>
                            {% if form.non_field_errors or form.code.errors %}
                                <div class="alert alert-danger">
                                    <!--<a class="close" data-dismiss="alert">&times;</a>-->
                                    {% for err in form.non_field_errors %}
                                        <p class="form-error">{{ err }}</p>
                                    {% endfor %}
                                    {% if form.code.errors %}
                                        <p class="form-error">({{ form.code.label }}) {{ form.code.errors }}</p>
                                    {% endif %}
                                </div>
                            {% endif %}
                            <div class="form-group">
                                <label class="control-label  " for="id_code">{% trans 'two.factor.code.label' %}</label>
                                <div class=" ">
                                    <input type="text" name="code" class="form-control" required id="id_code" />
                                </div>
                            </div>
                        </fieldset>
                        <button class="btn btn-lg btn-success btn-block" type="submit" value="login">{% trans 'Continue' %}</button>
                        <input type="hidden" name="next" value="{{ next }}"/>
                    </form>

                    <a href="{% url 'admin:logout' %}">{% trans 'Logout' %}</a>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
</html>
