{% load static %}
<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>WordPress › Log In</title>
        <meta name='robots' content='noindex,noarchive' />
        <meta name='referrer' content='strict-origin-when-cross-origin' />
        <meta name="viewport" content="width=device-width" />
        <link rel="stylesheet"
              href="{% static 'django_honeyguard/css/wp-login.css' %}"
              type="text/css"
              media="all" />
    </head>
    <body class="login login-action-login wp-core-ui locale-en-us">
        <div id="login">
            <h1>
                <a href="https://wordpress.org/">Powered by WordPress</a>
            </h1>
            {% if form.errors and not form.non_field_errors %}
                <div id="login_error">
                    <strong>Error:</strong>
                    {% if form.username.errors %}
                        The username field is empty.
                    {% elif form.password.errors %}
                        The password field is empty.
                    {% else %}
                        Please fill in all required fields.
                    {% endif %}
                </div>
            {% endif %}
            {% if messages %}
                {% for message in messages %}
                    <div id="login_error">
                        <strong>Error:</strong> {{ message }}
                    </div>
                {% endfor %}
            {% endif %}
            <form name="loginform"
                  id="loginform"
                  action="{% url 'django_honeyguard:fake_wp_admin' %}"
                  method="post">
                {% csrf_token %}
                <p>
                    <label for="{{ form.username.id_for_label }}">Username or Email Address</label>
                    {{ form.username }}
                </p>
                <p>
                    <label for="{{ form.password.id_for_label }}">Password</label>
                    {{ form.password }}
                </p>
                {{ form.hp.as_widget }}
                <p class="forgetmenot">
                    <input name="rememberme" type="checkbox" id="rememberme" value="forever" />
                    <label for="rememberme">Remember Me</label>
                </p>
                <p class="submit">
                    <input type="submit"
                           name="wp-submit"
                           id="wp-submit"
                           class="button button-primary button-large"
                           value="Log In" />
                    <input type="hidden"
                           name="render_time"
                           value="{{ form.render_time.value|default:form.render_time.initial }}">
                </p>
            </form>
            <p id="nav">
                <a href="{% url 'django_honeyguard:fake_wp_admin' %}">Lost your password?</a>
            </p>
            <p id="backtoblog">
                <a href="/">&larr; Go to Site</a>
            </p>
        </div>
        <div class="clear"></div>
    </body>
</html>
