{% 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">Add Librarian</div>
          <div class="card-body">
            <form method="post" action="{% url 'librarian_new' %}">
              {% csrf_token %}
              
              <div class="mb-3">
                <label for="id_name">First Name:</label>
                <input type="text" name="name" id="id_name" placeholder="Input Name" class="form-control" required>
              </div>
              <div class="mb-3">
                <label for="id_lname">Last Name:</label>
                <input type="text" name="last_name" id="id_lname" placeholder="Input Name" class="form-control" required>
              </div>
              <div class="mb-3">
                <label for="id_address" class="form-label">Address</label>
                <textarea type="text" name="address" id="id_address" placeholder="Input Address" class="form-control" required></textarea>
              </div>
              <div class="mb-3">
                <label for="id_birth_place" class="form-label">Birth Place</label>
                <input type="text" name="birth_place" id="id_birth_place" placeholder="Input Birth Place" class="form-control" required>
              </div>
              <div class="mb-3">
                <label for="id_date_birth" class="form-label">Birth Date</label>
                <input type="date" name="date_birth" id="id_date_birth" placeholder="Input datebirth" class="form-control" required>
              </div>
              <div class="mb-3">
                <label for="id_phone_number" class="form-label">Phone Number</label>
                {{form.phone_number}}
              </div>
              <button type="submit" class="btn btn-primary" role="button">Add Librarian</button>
              <a class="btn btn-warning col-2 mx-2" href="{% url 'librarian_list' %}"" role="button">Back</a>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
{% endblock content%}