remove edit buttons on author/publisher, in fact publisher is now a standard field with a BookForm SelectField, and showing, updating publisher works in book.html

This commit is contained in:
2020-12-02 19:48:51 +11:00
parent b5e9c41cfd
commit 93383c3bc0
2 changed files with 8 additions and 26 deletions

View File

@@ -32,24 +32,6 @@
</div>
{% endfor %}
</div>
{% elif key == "publisher" %}
<div class="form-row col input-group" style="margin-left:0px; margin-right:0px;">
<div class="input-group-prepend">
<button class="btn btn-outline-primary" type="button">
<a style="color:inherit" href="{{url_for(key, id=books[key][0].id)}}"><i class="far fa-edit"></i></a>
</button>
</div>
<select class="form-control" id="publisher">
{% for pub in publisher_list %}
{% set pname=pub.name %}
<option id="{{pub.id}}" value="{{pub.id}}"
{% if books.publisher[0].name == pname %}
selected
{% endif %}
>{{pname}}</option>
{% endfor %}
</select>
</div class="row">
{% elif key == "author" %}
<div class="form-row col" style="margin-left:0px;margin-right:0px">
{% set cnt = namespace(idx=0) %}
@@ -62,11 +44,6 @@
</button>
</div>
{% endif %}
<div class="input-group-prepend">
<button class="btn btn-outline-primary" type="button">
<a style="color:inherit" href="{{url_for(key, id=books[key][cnt.idx].id)}}"><i class="far fa-edit"></i></a>
</button>
</div>
<select class="form-control" id="author[{{cnt.idx}}]">
{% for auth in author_list %}
{% set aname=auth.surname+", "+auth.firstnames %}