{% extends 'auth/base.html' %}

{% block content %}
<div class="row my-5">
    <div class="col-md-12">
        <div class="row">
            <div class="col-md-6 mx-auto">
                <div class="card rounded-1">
                    <div class="card-header">
                        <h5 class="mb-0">Register</h5>
                    </div>
                    <div class="card-body">
                        {% if bag().any() %}
                            {% for error in bag().get_errors() %}
                                <div class="alert alert-danger" role="alert">
                                    {{ error }}
                                </div>
                            {% endfor %}
                        {% endif %}
                        <form class="form" action="{{ route('register') }}" method="POST">
                            {{ csrf_field }}
                            <div class="form-group">
                                <label for="">Username</label>
                                <input type="text" name="name" class="form-control form-control-md rounded-0" value="{{ old('name') }}">
                            </div>
                            <div class="form-group">
                                <label for="">Email</label>
                                <input type="email" name="email" class="form-control form-control-md rounded-0" value="{{ old('email') }}">
                            </div>
                            <div class="form-group">
                                <label>Password</label>
                                <input type="password" name="password" class="form-control form-control-md rounded-0">
                            </div>
                            <button type="submit" class="btn btn-success btn-md float-right">Register
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
