nsfw checkmarks not checked when editing fixes #54

This commit is contained in:
rimu 2024-02-18 11:46:11 +13:00
parent d020bae1de
commit e57e916221
4 changed files with 6 additions and 1 deletions

View file

@ -671,6 +671,8 @@ def post_edit(post_id: int):
form.image_body.data = post.body form.image_body.data = post.body
form.image_alt_text.data = post.image.alt_text form.image_alt_text.data = post.image.alt_text
form.notify_author.data = post.notify_author form.notify_author.data = post.notify_author
form.nsfw.data = post.nsfw
form.nsfl.data = post.nsfl
return render_template('post/post_edit.html', title=_('Edit post'), form=form, post=post, return render_template('post/post_edit.html', title=_('Edit post'), form=form, post=post,
markdown_editor=True, markdown_editor=True,
moderating_communities=moderating_communities(current_user.get_id()), moderating_communities=moderating_communities(current_user.get_id()),

View file

@ -1203,6 +1203,7 @@ fieldset legend {
.post_title .warning_badge { .post_title .warning_badge {
line-height: 32px; line-height: 32px;
margin-left: 15px;
} }
.conversation { .conversation {

View file

@ -892,6 +892,7 @@ fieldset {
.post_title { .post_title {
.warning_badge { .warning_badge {
line-height: 32px; line-height: 32px;
margin-left: 15px;
} }
} }

View file

@ -41,11 +41,12 @@
{% endif %} {% endif %}
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<div class="profile_action_buttons"> <div class="profile_action_buttons">
{% if not current_user.is_new() and current_user.reputation > 10 %} {% if not current_user.created_recently() and current_user.reputation > 10 %}
<a class="btn btn-primary" href="{{ url_for('chat.new_message', to=user.id) }}" rel="nofollow" aria-label="{{ _('Send message') }}">{{ _('Send message') }}</a> <a class="btn btn-primary" href="{{ url_for('chat.new_message', to=user.id) }}" rel="nofollow" aria-label="{{ _('Send message') }}">{{ _('Send message') }}</a>
{% if user.matrix_user_id %} {% if user.matrix_user_id %}
<a class="btn btn-primary" href="https://matrix.to/#/{{ user.matrix_user_id }}" rel="nofollow" aria-label="{{ _('Send message with matrix chat') }}">{{ _('Send message using Matrix') }}</a> <a class="btn btn-primary" href="https://matrix.to/#/{{ user.matrix_user_id }}" rel="nofollow" aria-label="{{ _('Send message with matrix chat') }}">{{ _('Send message using Matrix') }}</a>
{% endif %} {% endif %}
{% endif %}
{% if current_user.id != user.id %} {% if current_user.id != user.id %}
{% if current_user.has_blocked_user(user.id) %} {% if current_user.has_blocked_user(user.id) %}
<a class="btn btn-primary" href="{{ url_for('user.unblock_profile', actor=user.link()) }}" rel="nofollow">{{ _('Unblock user') }}</a> <a class="btn btn-primary" href="{{ url_for('user.unblock_profile', actor=user.link()) }}" rel="nofollow">{{ _('Unblock user') }}</a>