fixed BUG-1 (loan div in wrong spot)

This commit is contained in:
2021-01-03 11:51:22 +11:00
parent 4e4ff7f6c7
commit 195daf98e0
2 changed files with 16 additions and 17 deletions

View File

@@ -295,20 +295,6 @@ function AddAuthorToBook(num) {
</div class="form-row">
{{ hiddens.txt|safe }}
</form>
{% if 'Edit' in page_title %}
{% if b.parent|length == 0 %}
<form role="form" class="form col-lg-10" action="{{url_for('new_book')}}" method="POST">
<input type="hidden" name="add_sub_parent_id" value="{{books.id}}">
{{ book_form.add_sub( class="btn btn-outline-success offset-lg-2 col-lg-2" )}}
</form>
{% else %}
<form role="form" class="form col-lg-10" action="{{url_for('remove_sub_book')}}" method="POST">
<input type="hidden" name="rem_sub_sub_book_id" value="{{books.id}}">
<input type="hidden" name="rem_sub_parent_id" value="{{b.parent[0].id}}">
{{ book_form.rem_sub( class="btn btn-outline-danger offset-lg-2 col-lg-3" )}}
</form>
{% endif %}
{% endif %}
{% if books.loan|length %}
<div class="col">
<div class="card border-primary">
@@ -324,6 +310,22 @@ function AddAuthorToBook(num) {
</div>
{% endif %}
{% if 'Edit' in page_title %}
<div class="form-row">
{% if b.parent|length == 0 %}
<form role="form" class="form col-lg-10" action="{{url_for('new_book')}}" method="POST">
<input type="hidden" name="add_sub_parent_id" value="{{books.id}}">
{{ book_form.add_sub( class="btn btn-outline-success offset-lg-2 col-lg-2" )}}
</form>
{% else %}
<form role="form" class="form col-lg-10" action="{{url_for('remove_sub_book')}}" method="POST">
<input type="hidden" name="rem_sub_sub_book_id" value="{{books.id}}">
<input type="hidden" name="rem_sub_parent_id" value="{{b.parent[0].id}}">
{{ book_form.rem_sub( class="btn btn-outline-danger offset-lg-2 col-lg-3" )}}
</form>
{% endif %}
</div>
{% endif %}
</div class="row">
</div class="container">