lib.itmens/journal/templates/add_to_collection.html
2024-06-14 00:27:40 -04:00

40 lines
1.4 KiB
HTML

{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
{% load thumb %}
<div id="modal"
_="on closeModal add .closing then wait for animationend then remove me">
<div class="modal-underlay" _="on click trigger closeModal"></div>
<div class="modal-content">
<div class="add-to-list-modal__head">
<span class="add-to-list-modal__title">{% trans 'Add to collection' %}</span>
<span class="add-to-list-modal__close-button modal-close"
_="on click trigger closeModal">
<i class="fa-solid fa-xmark"></i>
</span>
</div>
<div class="add-to-list-modal__body">
<form action="{% url 'journal:add_to_collection' item.uuid %}"
method="post">
{% csrf_token %}
<select name="collection_id">
{% for collection in collections %}
<option value="{{ collection.id }}">
{{ collection.title }}
{% if collection.visibility > 0 %}🔒{% endif %}
</option>
{% endfor %}
<option value="0">({% trans "Create a new collection" %})</option>
</select>
<div>
<textarea type="text" name="note" placeholder="{% trans "note" %}"></textarea>
</div>
<div class="add-to-list-modal__confirm-button">
<input type="submit" class="button float-right" value="{% trans 'Save' %}">
</div>
</form>
</div>
</div>
</div>