diff --git a/r2/r2/controllers/promotecontroller.py b/r2/r2/controllers/promotecontroller.py index b5eea5e73..7e1dbf08c 100644 --- a/r2/r2/controllers/promotecontroller.py +++ b/r2/r2/controllers/promotecontroller.py @@ -413,6 +413,7 @@ class PromoteController(ListingController): kind=VOneOf('kind', ['link', 'self']), ip=ValidIP(), disable_comments=VBoolean("disable_comments"), + sendreplies=VBoolean("sendreplies"), media_width=VInt("media-width", min=0), media_height=VInt("media-height", min=0), media_embed=VLength("media-embed", 1000), @@ -420,7 +421,7 @@ class PromoteController(ListingController): domain_override=VLength("domain", 100) ) def POST_edit_promo(self, form, jquery, ip, username, l, title, url, - selftext, kind, disable_comments, media_height, + selftext, kind, disable_comments, sendreplies, media_height, media_width, media_embed, media_override, domain_override): should_ratelimit = False @@ -510,8 +511,9 @@ class PromoteController(ListingController): if kind == 'self': l.selftext = selftext - # comment disabling is free to be changed any time. + # comment disabling and sendreplies is free to be changed any time. l.disable_comments = disable_comments + l.sendreplies = sendreplies if c.user_is_sponsor or c.user.trusted_sponsor: if media_embed and media_width and media_height: l.media_object = dict(height=media_height, diff --git a/r2/r2/lib/promote.py b/r2/r2/lib/promote.py index fb0cafd46..5290ad41b 100644 --- a/r2/r2/lib/promote.py +++ b/r2/r2/lib/promote.py @@ -166,6 +166,7 @@ def new_promotion(title, url, selftext, user, ip): l = Link._submit(title, url, user, sr, ip) l.promoted = True l.disable_comments = False + l.sendreplies = True PromotionLog.add(l, 'promotion created') if url == 'self': diff --git a/r2/r2/templates/promotelinkform.html b/r2/r2/templates/promotelinkform.html index b3475902f..9105ecfe2 100644 --- a/r2/r2/templates/promotelinkform.html +++ b/r2/r2/templates/promotelinkform.html @@ -226,6 +226,8 @@ ${self.javascript_setup()}
${checkbox("disable_comments", _("disable comments"), link.disable_comments)}
+ ${checkbox("sendreplies", _("send comments on my ad to my inbox"), link.sendreplies)} +