From e57e9162213134c5761f8fe25735870822da21be Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:46:11 +1300 Subject: [PATCH] nsfw checkmarks not checked when editing fixes #54 --- app/post/routes.py | 2 ++ app/static/structure.css | 1 + app/static/structure.scss | 1 + app/templates/user/show_profile.html | 3 ++- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/post/routes.py b/app/post/routes.py index d5182c62..98e421e0 100644 --- a/app/post/routes.py +++ b/app/post/routes.py @@ -671,6 +671,8 @@ def post_edit(post_id: int): form.image_body.data = post.body form.image_alt_text.data = post.image.alt_text 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, markdown_editor=True, moderating_communities=moderating_communities(current_user.get_id()), diff --git a/app/static/structure.css b/app/static/structure.css index d1769a9d..36257131 100644 --- a/app/static/structure.css +++ b/app/static/structure.css @@ -1203,6 +1203,7 @@ fieldset legend { .post_title .warning_badge { line-height: 32px; + margin-left: 15px; } .conversation { diff --git a/app/static/structure.scss b/app/static/structure.scss index 48bbaedc..e324bc1a 100644 --- a/app/static/structure.scss +++ b/app/static/structure.scss @@ -892,6 +892,7 @@ fieldset { .post_title { .warning_badge { line-height: 32px; + margin-left: 15px; } } diff --git a/app/templates/user/show_profile.html b/app/templates/user/show_profile.html index e3bd11f2..3e20d9b3 100644 --- a/app/templates/user/show_profile.html +++ b/app/templates/user/show_profile.html @@ -41,11 +41,12 @@ {% endif %} {% if current_user.is_authenticated %}
- {% if not current_user.is_new() and current_user.reputation > 10 %} + {% if not current_user.created_recently() and current_user.reputation > 10 %} {{ _('Send message') }} {% if user.matrix_user_id %} {{ _('Send message using Matrix') }} {% endif %} + {% endif %} {% if current_user.id != user.id %} {% if current_user.has_blocked_user(user.id) %} {{ _('Unblock user') }}