altered book delete status to success, completed TODO-05 (books must be sold to be deleted - with tooltip to explain), and added new BUG-17 - changing some fields of parent book need to be reflected into sub book

This commit is contained in:
2021-01-09 22:00:08 +11:00
parent e923709663
commit 0432f46b20
4 changed files with 12 additions and 5 deletions

View File

@@ -366,7 +366,14 @@ function AddAuthorToBook(num) {
<div class="form-row col mx-0">
{{ book_form.submit( class="btn btn-primary offset-lg-2 col-lg-2" )}}
{% if 'Edit' in page_title %}
{{ book_form.delete( class="btn btn-outline-danger col-lg-2" )}}
{% if GetOwnedById(b.owned) == 'Sold' %}
{{ book_form.delete( class="btn btn-outline-danger col-lg-2" )}}
{% else %}
<span class="col-lg-2" tabindex="0" data-toggle="tooltip"
title="Cannot Delete unless the book is saved as Sold">
{{ book_form.delete( class="btn btn-outline-danger col disabled", disabled="true", style="pointer-events: none;" )}}
</span>
{% endif %}
{% endif %}
</div class="form-row">
</div class="form-row">
@@ -411,6 +418,7 @@ function AddAuthorToBook(num) {
{% block script_content %}
<script>
$(document).ready( function() {
$('[data-toggle="tooltip"]').tooltip()
$("#sub_book_content").load("/subbooks_for_book/{{books.id}}")
{% if CheckSeriesChange is defined and CheckSeriesChange != None %}
{% if CheckSeriesChange.type == 'parent' %}