tutorial and help texts for tags in new resource form
[redakcja.git] / apps / catalogue / templates / catalogue / document_create_missing.html
1 {% extends "catalogue/base.html" %}
2 {% load i18n %}
3
4 {% block inner_content %}
5     <h1>{% trans "Create a new resource" %}</h1>
6
7
8     <form enctype="multipart/form-data" method="POST">
9     {% csrf_token %}
10         {{ form.non_field_errors }}
11         <label for="owner">{% trans "Owner" %}</label>
12             {{ form.owner_organization.errors }}
13             <select class="form-control" name="owner_organization" id="owner"
14                 data-toggle="tutorial" data-tutorial="1" data-placement="bottom"
15                 data-content="{% trans 'You can choose whether the resource should be owned by you or by your organization. This can be changed later.' %}"
16             >
17                 <option>{{ request.user }}</option>
18                 {% for org in request.user.membership_set.all %}
19                     <option value="{{ org.organization.pk }}"
20                         {% if form.owner_organization.value == org.organization.pk %}selected="selected"{% endif %}
21                     >{{ org.organization }}</option>
22                 {% endfor %}
23             </select>
24         <label for="title">{% trans "Title" %}</label>
25             {{ form.title.errors }}
26             <input class="form-control" name="title" id="title" type="text" value='{{ form.title.value|default:"" }}'>
27         <label for="title">{% trans "Cover image" %}</label>
28             {{ form.cover.errors }}
29             {{ form.cover }}
30         <label for="publisher">{% trans "Publisher" %}</label>
31             {{ form.publisher.errors }}
32             <input class="form-control" name="publisher" id="publisher" type="text" value='{{ form.publisher.value|default:"" }}'>
33
34         {% for tag_form in tag_forms %}
35             {% for tag_field in tag_form %}
36                 <label for="id_{{ tag_form.prefix }}-{{ tag_field.name }}">{{ tag_field.label }}</label>
37                 {{ tag_field.errors }}
38                 {{ tag_field }}
39                 <div class="help-text" style="text-align: right;"></div>
40             {% endfor %}
41         {% endfor %}
42
43         <label for="description">{% trans "Summary" %}</label>
44             {{ form.description.errors }}
45             <textarea class="form-control" name="description" id="description"
46                 data-toggle="tutorial" data-tutorial="100" data-placement="top"
47                 data-content="{% trans 'You can provide a short description of the document here.' %}"
48             >{{ form.description.value|default:"" }}</textarea>
49
50         <button style="margin-top:1em;" class="btn btn-default" type="submit">{% trans "Create resource" %}</button>
51     </form>
52
53 {% endblock %}