microblog/app/templates/admin_new.html

52 lines
1.9 KiB
HTML

{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
{% block head %}
<title>{{ local_actor.display_name }} - New</title>
{% endblock %}
{% block content %}
{% if in_reply_to_object %}
<div class="actor-action">In reply to:</div>
{{ utils.display_object(in_reply_to_object) }}
{% endif %}
<div class="box">
<form class="form" action="{{ request.url_for("admin_actions_new") }}" enctype="multipart/form-data" method="POST">
{{ utils.embed_csrf_token() }}
{{ utils.embed_redirect_url() }}
<p>
<select name="visibility">
{% for (k, v) in visibility_choices %}
<option value="{{ k }}" {% if in_reply_to_object and in_reply_to_object.visibility.name == k %}selected{% endif %}>{{ v }}</option>
{% endfor %}
</select>
</p>
{% for emoji in emojis %}
<span class="ji">{{ emoji | emojify(True) | safe }}</span>
{% endfor %}
{% for emoji in custom_emojis %}
<span class="ji"><img src="{{ emoji.icon.url }}" alt="{{ emoji.name }}" title="{{ emoji.name }}" class="custom-emoji"></span>
{% endfor %}
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" placeholder="Hey!" style="font-size:1.2em;width:95%;">{{ content }}</textarea>
<p>
<input type="text" name="content_warning" placeholder="content warning (will mark the post as sensitive)" style="width:95%;">
</p>
<p>
<input type="checkbox" name="is_sensitive" id="is_sensitive"> <label for="is_sensitive">Mark attachment(s) as sensitive</label>
</p>
<input type="hidden" name="in_reply_to" value="{{ request.query_params.in_reply_to }}">
<p>
<input id="files" name="files" type="file" multiple style="width:95%;">
</p>
<div id="alts"></div>
<p>
<input type="submit" value="Publish">
</p>
</form>
</div>
<script src="/static/new.js"></script>
{% endblock %}