{% load static %}
{% load humanize %}

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="robots" content="none" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <title>{{ company.company_name | default_if_none:'' }} 賃貸空室情報システム ログイン</title>
    <link rel="shortcut icon" href="{% static 'vacancy_mgr/images/favicon.ico' %}">
    <link rel="stylesheet" href="{% static 'lib/bootstrap/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'users/css/login.css' %}">
    <script type="text/javascript" src="{% static 'lib/bootstrap/js/bootstrap.min.js' %}"></script>
</head>
<body>
    <div id="container">
        <div id="header" class="bg-dark">
            <h1 class="text-white">{{ company.company_name | default_if_none:'' }} 賃貸空室情報システム</h1>
        </div>

    {% if messages %}
        <div id="messages">
            <ul>
            {% for message in messages %}
                <li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
            {% endfor %}
            </ul>
        </div>
    {% endif %}

        <div id="contents">
            <form action="{% url 'login' %}" method="post" class="form-signin mb10">
                {% csrf_token %}
                {% if next %}
                <input type="hidden" name="next" value="{{ next }}" />
                {% endif %}
                <div class="form-group row">
                    <div class="col col-3 col-xl-2 col-form-label"><label class="mx-auto">ユーザID</label></div>
                    <div class="col col-9 col-xl-10">{{ form.username }}</div>
                </div>
                <div class="form-group row">
                    <div class="col col-3 col-xl-2 col-form-label"><label class="mx-auto">パスワード</label></div>
                    <div class="col col-9 col-xl-10">{{ form.password }}</div>
                </div>
                <button type="submit" name="login" class="btn btn-lg btn-primary">ログイン</button>
            </form>
        </div>
    </div>
    <footer><img src="{% static 'vacancy_mgr/images/logo.png' %}" alt="logo"></footer>
</body>
</html>
