Skip to content

Commit

Permalink
* .g-recaptcha adds 0.5rem bottom margin
Browse files Browse the repository at this point in the history
* when editing a post via ajax, the privacy setting is not maintained
  • Loading branch information
evgenyfadeev committed Mar 4, 2024
1 parent c6b1565 commit 8627b02
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion askbot/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ def clean_cancel_vote(self):


class CloseForm(forms.Form):
def __init__(self, *args, **kwargs):
def __init__(self, *args, **kwargs):
super(CloseForm, self).__init__(*args, **kwargs)
reasons = askbot_settings.QUESTION_CLOSE_REASONS
close_choices = tuple([tuple([reason, reason]) for reason in reasons])
Expand Down
4 changes: 4 additions & 0 deletions askbot/media/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion askbot/media/css/style.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions askbot/media/sass/components/recaptcha.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.g-recaptcha {
margin-bottom: 0.5rem;
}
1 change: 1 addition & 0 deletions askbot/media/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
@use './components/flat_pages.scss';
@use './components/post_moderation_message.scss';
@use './components/expander.scss';
@use './components/recaptcha.scss';
@use './error.scss';
@use './questions/index.scss';
@use './questions/questions_header.scss';
Expand Down
1 change: 1 addition & 0 deletions askbot/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,7 @@ def user_edit_post(self,
revision_comment=revision_comment,
by_email=by_email,
suppress_email=suppress_email,
is_private=is_private,
ip_addr=ip_addr
)
elif post.post_type == 'question':
Expand Down
9 changes: 6 additions & 3 deletions askbot/views/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,10 @@ def set_post_body(request):
message = _('Spam was detected in the post')
raise exceptions.PermissionDenied(message)

request.user.edit_post(post, body_text=body_text, suppress_email=suppress_email)
request.user.edit_post(post,
body_text=body_text,
suppress_email=suppress_email,
is_private=post.is_private()) # maintain privacy
return {'body_html': post.html}


Expand Down Expand Up @@ -1426,7 +1429,7 @@ def publish_post(request):
# privately to a group - i.e. the question was visible to the
# inquirer and the group only. When the answer was published
# it was shared with the enquirer
# Now the code is switched to a simpler mode -
# Now the code is switched to a simpler mode -
# "published" === visible to the "everyone" group.
# (and used to be "published" -> visible to the enquirer).
#enquirer = answer.thread._question_post().author
Expand All @@ -1439,7 +1442,7 @@ def publish_post(request):
post.thread.make_public()
else:
post.make_public()

message = _('The post is now published')
else:
#answer.remove_from_groups([enquirer_group])
Expand Down

0 comments on commit 8627b02

Please sign in to comment.