Create new books
This commit is contained in:
parent
d3162e12db
commit
a5baa1f5c6
5 changed files with 39 additions and 23 deletions
|
@ -13,11 +13,13 @@
|
|||
{% trans "Add Book" %}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if book %}
|
||||
<div>
|
||||
<p>{% trans "Added:" %} {{ book.created_date | naturaltime }}</p>
|
||||
<p>{% trans "Updated:" %} {{ book.updated_date | naturaltime }}</p>
|
||||
<p>{% trans "Last edited by:" %} <a href="{{ book.last_edited_by.remote_id }}">{{ book.last_edited_by.display_name }}</a></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
|
@ -26,7 +28,12 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book %}
|
||||
<form class="block" name="edit-book" action="{{ book.local_path }}/{% if confirm_mode %}confirm{% else %}edit{% endif %}" method="post" enctype="multipart/form-data">
|
||||
{% else %}
|
||||
<form class="block" name="create-book" action="/create-book{% if confirm_mode %}/confirm{% endif %}" method="post" enctype="multipart/form-data">
|
||||
{% endif %}
|
||||
|
||||
{% csrf_token %}
|
||||
{% if confirm_mode %}
|
||||
<div class="box">
|
||||
|
@ -111,12 +118,8 @@
|
|||
</label>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
{% if confirm_mode %}
|
||||
<input type="hidden" name="add_author" value="{{ add_author }}">
|
||||
{% else %}
|
||||
<label class="label" for="id_add_author">{% trans "Add Author:" %}</label>
|
||||
<input class="input" type="text" name="add_author" id="id_add_author" placeholder="{% trans 'John Doe' %}" value="{{ add_author }}">
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue