diff --git a/r2/r2/controllers/promotecontroller.py b/r2/r2/controllers/promotecontroller.py index f77064ed6..9d15b9bfe 100644 --- a/r2/r2/controllers/promotecontroller.py +++ b/r2/r2/controllers/promotecontroller.py @@ -363,10 +363,6 @@ class PromoteController(ListingController): url=VUrl('url', allow_self=False, lookup=False), ip=ValidIP(), disable_comments=VBoolean("disable_comments"), - set_clicks=VBoolean("set_maximum_clicks"), - max_clicks=VInt("maximum_clicks", min=0), - set_views=VBoolean("set_maximum_views"), - max_views=VInt("maximum_views", min=0), media_width=VInt("media-width", min=0), media_height=VInt("media-height", min=0), media_embed=VLength("media-embed", 1000), @@ -375,20 +371,12 @@ class PromoteController(ListingController): ) def POST_edit_promo(self, form, jquery, ip, l, title, url, disable_comments, - set_clicks, max_clicks, - set_views, max_views, media_height, media_width, media_embed, media_override, domain_override): should_ratelimit = False if not c.user_is_sponsor: - set_clicks = False - set_views = False should_ratelimit = True - if not set_clicks: - max_clicks = None - if not set_views: - max_views = None if not should_ratelimit: c.errors.remove((errors.RATELIMIT, 'ratelimit')) @@ -437,10 +425,6 @@ class PromoteController(ListingController): if trusted and promote.is_unapproved(l): promote.accept_promotion(l) - if c.user_is_sponsor: - l.maximum_clicks = max_clicks - l.maximum_views = max_views - # comment disabling is free to be changed any time. l.disable_comments = disable_comments if c.user_is_sponsor or c.user.trusted_sponsor: diff --git a/r2/r2/templates/promotelinkform.html b/r2/r2/templates/promotelinkform.html index 2c95d2fff..58f696e3a 100644 --- a/r2/r2/templates/promotelinkform.html +++ b/r2/r2/templates/promotelinkform.html @@ -352,39 +352,8 @@ ${self.javascript_setup()} <%utils:line_field title="${_('options')}" id="commenting-field" css_class="rounded">
- - <% - clicks = views = 0 - disable_comments = False - if thing.link: - disable_comments = getattr(thing.link, "disable_comments", False) - clicks = getattr(thing.link, "maximum_clicks", 0) or 0 - views = getattr(thing.link, "maximum_views", 0) or 0 - %> - - ${checkbox("disable_comments", _("disable comments"), disable_comments)} + ${checkbox("disable_comments", _("disable comments"), getattr(thing.link, 'disable_comments', False))}
- - %if c.user_is_sponsor: - ${checkbox("set_maximum_clicks", - unsafe("maximum clicks: " + - "" % clicks), - clicks)} -
- - ${checkbox("set_maximum_views", - unsafe("maximum views: " + - "" % views), - views)} -
- - %endif