{% extends "index.html"%} {% block content%}
<div class="card">
  <div class="card-header text-light bg-gradient-danger">
    <h3>Pinjam Buku {{book.judul}}</h3>
  </div>
  <div class="card-body">
    <form
      method="post"
      action="{% url 'loan_book_from_book' book.id%}"
      enctype="multipart/form-data"
      class="col-8"
    >
      {% csrf_token %}
      <div class="form-group row">
        <label class="col-4 col-form-label" for="judul">Id Buku</label>
        <div class="col-8">
          <input
            id="judul"
            name="buku"
            value="{{book.id}}"
            placeholder="Masukan Nama Buku"
            type="text"
            class="form-control"
            required="required"
            readonly
          />
        </div>
      </div>
      <div class="form-group row">
        <label class="col-4 col-form-label" for="judul">Id Buku</label>
        <div class="col-8">
          <input
            value="{{book.judul}}"
            readonly
            class="form-control"
          />
        </div>
      </div>
      <div class="form-group row">
        <label for="tanggal_kembali" class="col-4 col-form-label"> Tanggal Kembali</label> 
        <div class="col-8">
          <input id="tanggal_kembali" name="tanggal_kembali" placeholder="Masukan  tanggal kembali" type="date" class="form-control">
        </div>
      </div> 
    <hr>
      <button
        type="submit"
        name="submit"
        class="btn btn-primary align-items-center col-12"
      >
        Pinjam Buku
      </button>
      <hr>
      <a href="{% url 'book-list'%}" type="button col-5" class="btn btn-danger"><i class="fas fa-fw fa-arrow-left"></i>Back</a>
    </form>
  </div>
</div>
{% endblock content%}
