mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Do not force house priority for mobile targeting
This commit is contained in:
@@ -1008,11 +1008,6 @@ class PromoteApiController(ApiController):
|
||||
form.set_error(errors.BAD_PROMO_MOBILE_OS, 'mobile_os')
|
||||
return
|
||||
|
||||
if platform == 'mobile' and priority.cpm:
|
||||
c.errors.add(errors.BAD_PROMO_MOBILE_PRIORITY, field='priority')
|
||||
form.set_error(errors.BAD_PROMO_MOBILE_PRIORITY, 'priority')
|
||||
return
|
||||
|
||||
if not (c.user_is_sponsor or platform == 'desktop'):
|
||||
return abort(403, 'forbidden')
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ error_list = dict((
|
||||
('GOLD_ONLY_SR_REQUIRED', _("this subreddit must be 'gold only' to select this")),
|
||||
('CANT_CREATE_SR', _("your account is too new to create a subreddit. please contact the admins to request an exemption.")),
|
||||
('BAD_PROMO_MOBILE_OS', _("you must select at least one mobile OS to target")),
|
||||
('BAD_PROMO_MOBILE_PRIORITY', _("mobile campaigns may only use house priority")),
|
||||
))
|
||||
|
||||
errors = Storage([(e, e) for e in error_list.keys()])
|
||||
|
||||
@@ -1064,11 +1064,10 @@ var exports = r.sponsored = {
|
||||
var platformOverride = platformTargeting.isMobile && platformTargeting.platform === 'mobile';
|
||||
|
||||
var $priorities = $form.find('*[name="priority"]');
|
||||
if (platformOverride) {
|
||||
if (platformOverride && this.currentPlatform != 'mobile') {
|
||||
$priorities.filter('[value="house"]').prop('checked', 'checked');
|
||||
$priorities.filter(':not([value="house"])').prop('disabled', true);
|
||||
} else {
|
||||
if (this.currentPlatform === 'mobile') {
|
||||
if (!platformOverride && this.currentPlatform === 'mobile') {
|
||||
$priorities.filter('[value="standard"]').prop('checked', 'checked');
|
||||
}
|
||||
$priorities.prop('disabled', false);
|
||||
|
||||
@@ -445,7 +445,6 @@
|
||||
%endif
|
||||
</label>
|
||||
%endfor
|
||||
${error_field("BAD_PROMO_MOBILE_PRIORITY", "priority", "div")}
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user