upgraded to base U22.04 image, realised that by putting bootstrap5 stuff in for login its borked the format of many files, so partially converted to use new bootstrap, still work to go
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
<button id="series-minus-but-NUM" class="btn btn-outline-danger" type="button"><i class="fas fa-minus"></i></button>
|
||||
</div>
|
||||
<input type="hidden" id="bsl-book_id-NUM" name="bsl-book_id-NUM" value="{{books.id}}">
|
||||
<span class="form-control col-lg-2">Book </span>
|
||||
<input type="text" id="bsl-book_num-NUM" name="bsl-book_num-NUM" class="form-control col-lg-1" placeholder="number">
|
||||
<span class="form-control col-lg-1"> of </span>
|
||||
<select class="form-control col" id="bsl-series_id-NUM" name="bsl-series_id-NUM">
|
||||
<span class="form-control col-2">Book </span>
|
||||
<input type="text" id="bsl-book_num-NUM" name="bsl-book_num-NUM" class="form-control col-1" placeholder="number">
|
||||
<span class="form-control col-1"> of </span>
|
||||
<select class="form-select col" id="bsl-series_id-NUM" name="bsl-series_id-NUM">
|
||||
{% for s in poss_series_list %}
|
||||
<option value="{{s.id}}">{{s.title}}</option>
|
||||
{% endfor %}
|
||||
@@ -30,7 +30,7 @@ function ConfirmRemoveParentAndSubsFromSeries(pid,bid,rem)
|
||||
else
|
||||
all='this '
|
||||
div=`
|
||||
<div class="row col-lg-12">
|
||||
<div class="row col-12">
|
||||
<p class="lead">You have chosen to remove this (parent) book from a series.
|
||||
What should we do with the sub-books for
|
||||
`
|
||||
@@ -38,10 +38,10 @@ function ConfirmRemoveParentAndSubsFromSeries(pid,bid,rem)
|
||||
div += `
|
||||
series?</p>
|
||||
</div class="row">
|
||||
<div class="row col-lg-12">
|
||||
<button id="RPS" class="btn btn-primary col-lg-2">Remove all children</button>
|
||||
<div class="row col-12">
|
||||
<button id="RPS" class="btn btn-primary col-2">Remove all children</button>
|
||||
<button onClick="$('#dbox').modal('hide')"
|
||||
class="btn btn-outline-danger offset-lg-8 col-lg-2"> Cancel Series change</button>
|
||||
class="btn btn-outline-danger offset-8 col-2"> Cancel Series change</button>
|
||||
</div class="row">
|
||||
`
|
||||
$('#dbox-content').html(div)
|
||||
@@ -54,12 +54,12 @@ function ConfirmRemoveThisSubs_ParentAndSubsFromSeries(pid,bid,rem)
|
||||
{
|
||||
$('#dbox-title').html('Confirm: Removing Sub Book from Series')
|
||||
div=`
|
||||
<div class="row col-lg-12">
|
||||
<div class="row col-12">
|
||||
<p class="lead">You have chosen to remove this (sub) book from a series.
|
||||
What should we do with the sub-books <span id="RPS-text"></span>
|
||||
</p>
|
||||
</div class="row">
|
||||
<div class="row col-lg-12">
|
||||
<div class="row col-12">
|
||||
<button id="RPS" class="btn btn-primary col"></button>
|
||||
<button id="RPS-one" onClick="alert('not yet')" class="btn btn-outline-primary col"></button>
|
||||
<button onClick="$('#dbox').modal('hide')" class="btn btn-outline-danger col">
|
||||
@@ -181,7 +181,7 @@ function AddAuthorToBook(num) {
|
||||
<div class="input-group-prepend">
|
||||
<button class="btn btn-outline-danger" type="button" onClick="RemoveAuthorFromBook(NUM)"><i class="fas fa-minus"></i></button>
|
||||
</div>
|
||||
<select class="form-control" name="author-NUM" id="author-NUM">
|
||||
<select class="form-select" name="author-NUM" id="author-NUM">
|
||||
{% for auth in author_list %}
|
||||
{% set aname=auth.surname+", "+auth.firstnames %}
|
||||
<option value="{{auth.id}}">{{aname}}</option>
|
||||
@@ -198,30 +198,33 @@ function AddAuthorToBook(num) {
|
||||
|
||||
{% set keys = [ 'title', 'author', 'publisher', 'genre', 'owned', 'covertype', 'condition', 'year_published', 'rating', 'notes', 'blurb' ] %}
|
||||
<div class="container-fluid">
|
||||
<div class="form-row col-lg-10"><h3 class="offset-lg-2">{{page_title}}</h3></div>
|
||||
<div class="form-row col-10"><h3 class="offset-2">{{page_title}}</h3></div>
|
||||
<div class="row" id="main-row">
|
||||
<form role="form" class="form col-lg-10" action="" method="POST">
|
||||
<form role="form" class="form col-10" action="" method="POST">
|
||||
{{ book_form.id }}
|
||||
{{ book_form.csrf_token }}
|
||||
{% if b.parent|length %}
|
||||
<div class="form-row">
|
||||
<label class="col-lg-2 col-form-label bg-secondary text-white">Parent Book:</label>
|
||||
<div class="input-group">
|
||||
<label class="input-group-text col-2 col-form-label bg-secondary text-white"><i>Parent Book:</i></label>
|
||||
<div class="col">
|
||||
<button disabled class="col btn btn-outline-primary">
|
||||
<i><a href="/book/{{b.parent[0].id}}">{{b.parent[0].title}}</a></i>
|
||||
</button>
|
||||
<span class="col-12 d-flex h-100 border rounded-end border-primary">
|
||||
<i class="col-12 d-flex h-100 justify-content-center"><a href="/book/{{b.parent[0].id}}">{{b.parent[0].title}}</a></i>
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" name="parent_id" value="{{b.parent[0].id}}">
|
||||
<input type="hidden" name="parent_title" value="{{b.parent[0].title}}">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for key in keys %}
|
||||
<div class="form-row">
|
||||
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
||||
<div class="input-group">
|
||||
<label for="{{key}}" class="input-group-text col-2 justify-content-end">{{key}}:</label>
|
||||
{% if key == "genre" %}
|
||||
<div class="form-row col-lg-10">
|
||||
<div class="row col-10">
|
||||
{% for genre in genre_list %}
|
||||
<div class="form-control col" style="margin-left:5px;margin-right:-5px;">
|
||||
<div class="form-control col">
|
||||
<input id="genre-{{genre.id}}" name="genre-{{genre.id}}" type="checkbox"
|
||||
{% for book_g in books.genre %}
|
||||
{% if book_g['name'] == genre.name %}
|
||||
@@ -243,7 +246,7 @@ function AddAuthorToBook(num) {
|
||||
<button class="btn btn-outline-danger" type="button" onClick="RemoveAuthorFromBook({{cnt.idx}})"><i class="fas fa-minus"></i></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<select class="form-control" name="author-{{cnt.idx}}" id="author-{{cnt.idx}}">
|
||||
<select class="form-select" name="author-{{cnt.idx}}" id="author-{{cnt.idx}}">
|
||||
{% for auth in author_list %}
|
||||
{% set aname=auth.surname+", "+auth.firstnames %}
|
||||
<option value="{{auth.id}}"
|
||||
@@ -258,7 +261,7 @@ function AddAuthorToBook(num) {
|
||||
{% endfor %}
|
||||
{% if cnt.idx == 0 %}
|
||||
<div id="auth-div-{{cnt.idx}}" class="col input-group px-0">
|
||||
<select class="form-control" name="author-{{cnt.idx}}" id="author-{{cnt.idx}}">
|
||||
<select class="form-select" name="author-{{cnt.idx}}" id="author-{{cnt.idx}}">
|
||||
{% for auth in author_list %}
|
||||
{% set aname=auth.surname+", "+auth.firstnames %}
|
||||
<option value="{{auth.id}}">{{aname}}</option>
|
||||
@@ -281,16 +284,20 @@ function AddAuthorToBook(num) {
|
||||
or key == 'condition' or key == 'blurb' ) %}
|
||||
{{book_form[key](class="form-control", rows=rows, disabled="disabled" )}}
|
||||
{# disabled fields do not come through in form post, so add hidden to make it work #}
|
||||
<input type="hidden" name="{{key}}" value="{{book_form[key].data}}">
|
||||
<input type="hidden" name="{{key}}" value="{{book_form[key].data}}">
|
||||
{% elif key == 'publisher' or key == 'owned' or key == 'covertype'
|
||||
or key == 'condition' or key == 'rating' %}
|
||||
{{book_form[key](class="form-select" )}}
|
||||
{% else %}
|
||||
{{book_form[key](class="form-control", rows=rows )}}
|
||||
{{book_form[key](class="form-control", rows=rows )}}
|
||||
{% endif %}
|
||||
</div class="col">
|
||||
{% endif %}
|
||||
</div class="input-group">
|
||||
</div class="form-row">
|
||||
{% endfor %}
|
||||
<div id="series_row" class="form-row">
|
||||
<label for="series" class="col-lg-2 col-form-label">Series:</label>
|
||||
<label for="series" class="col-2 col-form-label">Series:</label>
|
||||
{# putting hidden inputs in between input-groups breaks formatting, so use this var to collect them and add just before form ends #}
|
||||
{% set hiddens=namespace(txt='') %}
|
||||
{% if books.series|length %}
|
||||
@@ -354,7 +361,7 @@ function AddAuthorToBook(num) {
|
||||
</div id="series_row">
|
||||
{% if books.child_ref|length %}
|
||||
<div class="form-row">
|
||||
<label class="col-lg-2 col-form-label">Sub Books:</label>
|
||||
<label class="col-2 col-form-label">Sub Books:</label>
|
||||
<div class="col" id="sub_book_content">
|
||||
</div>
|
||||
</div>
|
||||
@@ -362,12 +369,12 @@ function AddAuthorToBook(num) {
|
||||
<div id="spacer"><br></div>
|
||||
<div class="form-row">
|
||||
<div class="form-row col mx-0">
|
||||
{{ book_form.submit( class="btn btn-primary offset-lg-2 col-lg-2" )}}
|
||||
{{ book_form.submit( class="btn btn-primary offset-2 col-2" )}}
|
||||
{% if 'Edit' in page_title %}
|
||||
{% if GetOwnedById(b.owned) == 'Sold' %}
|
||||
{{ book_form.delete( class="btn btn-outline-danger col-lg-2" )}}
|
||||
{{ book_form.delete( class="btn btn-outline-danger col-2" )}}
|
||||
{% else %}
|
||||
<span class="col-lg-2" tabindex="0" data-toggle="tooltip"
|
||||
<span class="col-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>
|
||||
@@ -396,15 +403,15 @@ function AddAuthorToBook(num) {
|
||||
{% 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">
|
||||
<form role="form" class="form col-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" )}}
|
||||
{{ book_form.add_sub( class="btn btn-outline-success offset-2 col-2" )}}
|
||||
</form>
|
||||
{% else %}
|
||||
<form role="form" class="form col-lg-10" action="{{url_for('remove_sub_book')}}" method="POST">
|
||||
<form role="form" class="form col-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" )}}
|
||||
{{ book_form.rem_sub( class="btn btn-outline-danger offset-2 col-3" )}}
|
||||
</form>
|
||||
{% endif %}
|
||||
</div class="form-row">
|
||||
|
||||
Reference in New Issue
Block a user