Styled book form and added an ux dropzone component.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
<form method="post" action="{{ path('app_book_delete', {'id': book.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ book.id) }}">
|
||||
<button class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<div class="card border-danger mb-3 mt-5" style="">
|
||||
<div class="card-header text-danger">Danger zone</div>
|
||||
<div class="card-body text-danger">
|
||||
<h5 class="card-title">Delete book with all the information and files</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
<form method="post" action="{{ path('app_book_delete', {'id': book.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ book.id) }}">
|
||||
<button class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,78 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn btn-primary">{{ button_label|default('Save') }}</button>
|
||||
<div class="my-custom-class-for-errors">
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{# <input type="text" name="sss" v-model="xxx" /> #}
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.title) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.subtitle) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.author) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.category) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.isbn) }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
{{ form_row(form.pages) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.tags) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.publish_date) }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.publisher) }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.language) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.series) }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.volume) }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.rating) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ form_row(form.ebook) }}
|
||||
</div>
|
||||
{% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %}
|
||||
<div class="col-md-1 mt-4">
|
||||
<img class="img-thumbnail"
|
||||
style="max-width: 80px"
|
||||
src="{{ asset('book_covers/cover_' ~ book.id ~ '.jpg' ) }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %}col-md-4 {% else %} col-md-6 {% endif %}">
|
||||
{{ form_row(form.cover) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.cover_url) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn btn-primary">{{ button_label|default('Save') }}</button>
|
||||
<a href="{{ path('app_book_index') }}" class="btn btn-light">Back to list</a>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
Reference in New Issue
Block a user