-
Notifications
You must be signed in to change notification settings - Fork 2
/
add.html
33 lines (30 loc) · 1.04 KB
/
add.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% extends 'home/base.html' %}
{% load static %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block content %}
<h1>
{% trans 'Upload Book' %}
</h1>
<form method="post" enctype="multipart/form-data">{% csrf_token %}
<div class="container">
<div class="row">
<div class="col-sm ">
{{ form.author|as_crispy_field }}
{{ form.title|as_crispy_field }}
{{ form.cover|as_crispy_field }}
{% comment %}Workaround because help_test in models doesn't work{% endcomment %}
<p>{% trans 'Cover proportions should be 2/3. I.E. width x 1.5 = height' %}</p>
{% comment %} {{ form.tag|as_crispy_field }} {% endcomment %}
</div>
<div class="col-sm">
{{ form.file_epub|as_crispy_field }}
{{ form.file_mobi|as_crispy_field }}
{{ form.file_pdf|as_crispy_field }}
</div>
</div>
</div>
<button type='file' class="btn btn-primary btn-sm">{% trans 'Save' %}</button>
<button onclick="window.history.back();" class="btn btn-warning btn-sm" type="button">{% trans 'Back' %}</button>
</form>
{% endblock %}