{% extends 'base.html' %}
{% block content%}

<div class="container">
  <div class="row justify-content-center">
    <div class="col-md-6 mt-5">
      <div class="card">
        <div class="card-header bg-primary text-white">Member Registration</div>
        <div class="card-body">
          <form method="post" action="{% url 'librarian_registration' %}" enctype="multipart/form-data">
            {% csrf_token %}
            <div class="form-group m-3">     
              <label for="">Username</label>
              {{ form.username }}
          </div>
          
          <div class="form-group m-3">
              <label for="">Email</label>
              {{ form.email }}

          </div>
          <div class="form-group m-3">
              <label for="">Is Librarian:</label>
              {{ form.is_librarian }}
          </div>
          <div class="form-group m-2">
              <label for="">Password</label>
              {{ form.password1 }}

          </div>
          <div class="form-group m-2">
              <label for="">Confirm Password</label>
              {{ form.password2 }}

          </div>
            <button type="submit" class="btn btn-primary" role="button">Create</button>
            <a class="btn btn-danger col-2 mx-2" href="{% url 'book-list' %}" role="button">Back</a>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- <div style="text-align: center; margin-top: 50px;">
    <h2>Create Account</h2>
    <form method="post" action="{% url 'librarian_registration' %}">
        {% csrf_token %}
        {{ form.as_p }}
        <button type="submit" class="btn btn-primary">Save</button>
    </form>
</div> -->

{% endblock content%}
