Skip to content

Commit 8627b02

Browse files
committed
* .g-recaptcha adds 0.5rem bottom margin
* when editing a post via ajax, the privacy setting is not maintained
1 parent c6b1565 commit 8627b02

File tree

7 files changed

+17
-5
lines changed

7 files changed

+17
-5
lines changed

askbot/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ def clean_cancel_vote(self):
12321232

12331233

12341234
class CloseForm(forms.Form):
1235-
def __init__(self, *args, **kwargs):
1235+
def __init__(self, *args, **kwargs):
12361236
super(CloseForm, self).__init__(*args, **kwargs)
12371237
reasons = askbot_settings.QUESTION_CLOSE_REASONS
12381238
close_choices = tuple([tuple([reason, reason]) for reason in reasons])

askbot/media/css/style.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

askbot/media/css/style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.g-recaptcha {
2+
margin-bottom: 0.5rem;
3+
}

askbot/media/sass/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
@use './components/flat_pages.scss';
4949
@use './components/post_moderation_message.scss';
5050
@use './components/expander.scss';
51+
@use './components/recaptcha.scss';
5152
@use './error.scss';
5253
@use './questions/index.scss';
5354
@use './questions/questions_header.scss';

askbot/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,7 @@ def user_edit_post(self,
22202220
revision_comment=revision_comment,
22212221
by_email=by_email,
22222222
suppress_email=suppress_email,
2223+
is_private=is_private,
22232224
ip_addr=ip_addr
22242225
)
22252226
elif post.post_type == 'question':

askbot/views/commands.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,10 @@ def set_post_body(request):
688688
message = _('Spam was detected in the post')
689689
raise exceptions.PermissionDenied(message)
690690

691-
request.user.edit_post(post, body_text=body_text, suppress_email=suppress_email)
691+
request.user.edit_post(post,
692+
body_text=body_text,
693+
suppress_email=suppress_email,
694+
is_private=post.is_private()) # maintain privacy
692695
return {'body_html': post.html}
693696

694697

@@ -1426,7 +1429,7 @@ def publish_post(request):
14261429
# privately to a group - i.e. the question was visible to the
14271430
# inquirer and the group only. When the answer was published
14281431
# it was shared with the enquirer
1429-
# Now the code is switched to a simpler mode -
1432+
# Now the code is switched to a simpler mode -
14301433
# "published" === visible to the "everyone" group.
14311434
# (and used to be "published" -> visible to the enquirer).
14321435
#enquirer = answer.thread._question_post().author
@@ -1439,7 +1442,7 @@ def publish_post(request):
14391442
post.thread.make_public()
14401443
else:
14411444
post.make_public()
1442-
1445+
14431446
message = _('The post is now published')
14441447
else:
14451448
#answer.remove_from_groups([enquirer_group])

0 commit comments

Comments
 (0)