made subbook show it is one more visually, also disabled fields that are part of the parent book so they cannot be changed
This commit is contained in:
@@ -12,6 +12,16 @@
|
|||||||
<form role="form" class="form col-lg-10" action="" method="POST">
|
<form role="form" class="form col-lg-10" action="" method="POST">
|
||||||
{{ book_form.id }}
|
{{ book_form.id }}
|
||||||
{{ book_form.csrf_token }}
|
{{ 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="col">
|
||||||
|
<button disabled class="col btn btn-outline-primary">
|
||||||
|
<i><a href="/book/{{b.parent[0].id}}">{{b.parent[0].title}}</a></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% for key in keys %}
|
{% for key in keys %}
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
||||||
@@ -67,7 +77,13 @@
|
|||||||
{% if key == "notes" %}
|
{% if key == "notes" %}
|
||||||
{% set rows=2 %}
|
{% set rows=2 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if b.parent|length and
|
||||||
|
(key == 'publisher' or key == 'owned' or key == 'covertype'
|
||||||
|
or key == 'condition' or key == 'blurb' ) %}
|
||||||
|
{{book_form[key](class="form-control", value=books[key], rows=rows, disabled="disabled" )}}
|
||||||
|
{% else %}
|
||||||
{{book_form[key](class="form-control", value=books[key], rows=rows )}}
|
{{book_form[key](class="form-control", value=books[key], rows=rows )}}
|
||||||
|
{% endif %}
|
||||||
</div class="col">
|
</div class="col">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div class="form-row">
|
</div class="form-row">
|
||||||
@@ -95,14 +111,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if b.parent|length %}
|
|
||||||
<div class="form-row">
|
|
||||||
<label class="col-lg-2 col-form-label">Parent Book:</label>
|
|
||||||
<div class="col">
|
|
||||||
<label class="form-control-plaintext"><a href="/book/{{b.parent[0].id}}">{{b.parent[0].title}}</a></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="form-row col-lg-12">
|
<div class="form-row col-lg-12">
|
||||||
{{ book_form.delete( class="btn btn-outline-danger offset-lg-2 col-lg-2" )}}
|
{{ book_form.delete( class="btn btn-outline-danger offset-lg-2 col-lg-2" )}}
|
||||||
{{ book_form.submit( class="btn btn-primary col-lg-2" )}}
|
{{ book_form.submit( class="btn btn-primary col-lg-2" )}}
|
||||||
|
|||||||
Reference in New Issue
Block a user