2022-11-16 05:53:39 -08:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}Compose{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<form action="." method="POST">
|
|
|
|
{% csrf_token %}
|
2022-11-17 16:43:00 -08:00
|
|
|
<fieldset>
|
|
|
|
<legend>Content</legend>
|
2022-11-24 14:17:32 -08:00
|
|
|
{% if reply_to %}
|
2022-11-25 15:34:45 -08:00
|
|
|
<label>Replying to</label>
|
|
|
|
{% include "activities/_mini_post.html" with post=reply_to %}
|
2022-11-24 14:17:32 -08:00
|
|
|
{% endif %}
|
|
|
|
{{ form.reply_to }}
|
2022-11-27 10:09:46 -08:00
|
|
|
{{ form.id }}
|
2022-11-17 16:43:00 -08:00
|
|
|
{% include "forms/_field.html" with field=form.text %}
|
|
|
|
{% include "forms/_field.html" with field=form.content_warning %}
|
|
|
|
{% include "forms/_field.html" with field=form.visibility %}
|
|
|
|
</fieldset>
|
2022-12-01 17:46:49 -08:00
|
|
|
<fieldset>
|
|
|
|
<legend>Images</legend>
|
|
|
|
{% if post %}
|
|
|
|
{% for attachment in post.attachments.all %}
|
|
|
|
{% include "activities/_image_uploaded.html" %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if not post or post.attachments.count < 4 %}
|
2023-01-08 11:20:05 -08:00
|
|
|
<button class="add-image"
|
2022-12-01 17:46:49 -08:00
|
|
|
hx-get='{% url "compose_image_upload" %}'
|
|
|
|
hx-target="this"
|
|
|
|
hx-swap="outerHTML">
|
|
|
|
Add Image
|
2023-01-08 11:20:05 -08:00
|
|
|
</button>
|
2022-12-01 17:46:49 -08:00
|
|
|
{% endif %}
|
|
|
|
</fieldset>
|
2022-11-16 05:53:39 -08:00
|
|
|
<div class="buttons">
|
2022-12-11 08:25:48 -08:00
|
|
|
<span id="character-counter">{{ config.post_length }}</span>
|
|
|
|
<button id="post-button">{% if post %}Save Edits{% elif config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button>
|
2022-11-16 05:53:39 -08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|