first commit for removing books from a loan itself, works and the scaffold is there for adding new books, code to be written

This commit is contained in:
2021-01-04 16:23:09 +11:00
parent cc13ecfc87
commit 17c0c2a024
5 changed files with 140 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
{% if not InDBox %}
<html>
<head>
<!-- Required meta tags -->
@@ -14,6 +15,46 @@
</head>
<body>
<div id="dbox" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog mw-100 w-75">
<div class="modal-content">
<div class="modal-header">
<h5 id="dbox-title" class="modal-title">Add / Remove Books to / from Loan</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div id="dbox-content" class="row">
<div id="bfl-existing" class="col-lg-10 px-0">
</div>
<div class="col">
<button id="bfl-remsel-btn" class="btn btn-danger disabled" disabled onClick="RemoveSelFromLoan()">Remove Selected</button>
</div>
<div id="bfl-search" class="input-group">
<input class="form-control" type="text" id="bfl-search-term" placeholder="title of book(s) to add">
<div class="input-group-append">
<button type="button" class="btn btn-primary" onClick="FindNewBFL()">Search</button>
</div>
</div>
<br>
<div id="bfl-new" class="col-lg-10 px-0 py-4">
</div>
<div class="col py-4">
<button id="bfl-addsel-btn" class="btn btn-success disabled" disabled style="display:none" onClick="">Add Selected</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<nav class="navbar navbar-expand-lg navbar-light bg-light justify-content-between">
<a class="navbar-brand" href="/">Books DB</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
@@ -81,9 +122,12 @@
{{ ClearStatus() }}
</div>
{% endif %}
{% endif %}
{% block main_content %}
{% endblock main_content %}
{% if not InDBox %}
<!-- code to get bootstrap & bootstrap datatable to work -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
@@ -97,3 +141,4 @@
{%block script_content %}{% endblock script_content %}
</body>
</html>
{% endif %}