moviewyrm/bookwyrm/templates/book/file_links/add_link_modal.html

63 lines
2.1 KiB
HTML
Raw Normal View History

2021-12-15 20:40:01 +00:00
{% extends 'components/modal.html' %}
{% load i18n %}
2021-12-27 20:42:24 +00:00
{% load static %}
2021-12-15 20:40:01 +00:00
{% block modal-title %}
{% trans "Add file link" %}
{% endblock %}
{% block modal-form-open %}
2022-01-12 17:52:26 +00:00
<form name="add-link" method="POST" action="{% url 'file-link-add' book.id %}">
2021-12-15 20:40:01 +00:00
{% endblock %}
{% block modal-body %}
{% csrf_token %}
2021-12-16 00:23:21 +00:00
<input type="hidden" name="book" value="{{ book.id }}">
2022-01-10 21:27:01 +00:00
<input type="hidden" name="added_by" value="{{ request.user.id }}">
2022-01-09 21:27:47 +00:00
<p class="notification">
{% trans "Links from unknown domains will need to be approved by a moderator before they are added." %}
</p>
2021-12-15 20:40:01 +00:00
<div class="columns">
<div class="column is-four-fifths">
<label class="label" for="id_url">{% trans "URL:" %}</label>
2021-12-15 21:20:05 +00:00
<input type="url" name="url" maxlength="255" class="input" required="" id="id_url" value="{% firstof file_link_form.url.value "" %}" placeholder="https://..." aria-describedby="desc_name">
{% include 'snippets/form_errors.html' with errors_list=file_link_form.url.errors id="desc_url" %}
2021-12-15 20:40:01 +00:00
</div>
<div class="column is-one-fifth">
<label class="label" for="id_filetype">{% trans "File type:" %}</label>
2022-01-13 01:02:30 +00:00
<input
type="text"
name="filetype"
2022-01-17 18:48:42 +00:00
maxlength="50"
2022-01-13 01:02:30 +00:00
class="input"
required=""
id="id_filetype"
value="{% firstof file_link_form.filetype.value '' %}"
placeholder="ePub"
list="mimetypes-list"
data-autocomplete="mimetype"
>
<datalist id="mimetypes-list"></datalist>
2021-12-15 21:20:05 +00:00
{% include 'snippets/form_errors.html' with errors_list=file_link_form.filetype.errors id="desc_filetype" %}
2021-12-15 20:40:01 +00:00
</div>
</div>
2022-01-17 17:21:58 +00:00
<div>
<label class="label" for="id_availability">
{% trans "Availability:" %}
</label>
<div class="select">
{{ file_link_form.availability }}
</div>
</div>
2021-12-15 20:40:01 +00:00
{% endblock %}
{% block modal-footer %}
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
2021-12-15 20:40:01 +00:00
{% endblock %}
{% block modal-form-close %}</form>{% endblock %}