{% extends "phone_auth/base.html" %}

{% block title_block %}
    Sign In
{% endblock title_block %}
    
{% block body_block %}
    <!--suppress HtmlUnknownAttribute -->
<div class="phoneauthform">
    <h3 class="phoneauthform-title">Sign In</h3>
    <form class="phoneauthform-content" method="POST">
        {% csrf_token %}
        {{ form.non_field_errors }}

        <div class="fieldWrapper">
            {{ form.login.errors }}
            <label for="id_login">
                Phone, Email or Username:
            </label>
            <input type="text"
                   id="id_login"
                   name="{{ form.login.html_name }}"
                   {% if form.login.value %}
                        value="{{ form.login.value }}"
                   {% endif %}
                   {% if form.login.field.required %}required{% endif %}>
        </div>

        <div class="fieldWrapper">
            {{ form.password.errors }}
            <label for="id_password">
                Password:
            </label>
            <input type="password"
                   id="id_password"
                   name="{{ form.password.html_name }}"
                   {% if form.password.field.required %}required{% endif %}>
        </div>

        <button type="submit">Submit</button>
    </form>
    <div class="dpa-help-text">
        <p>
            Don't have an account? <a href="{% url 'phone_auth:phone_signup' %}">Sign up</a>
        </p> 
        <a href="{% url 'phone_auth:phone_password_reset' %}">Forgot Password?</a>
    </div>
</div>
{% endblock body_block %}
