mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
Remove default subreddit from submit form for special reddits.
This commit is contained in:
@@ -1755,8 +1755,8 @@ class NewLink(Templated):
|
||||
|
||||
self.on_default_sr = c.default_sr
|
||||
|
||||
if isinstance(c.site, FakeSubreddit):
|
||||
self.default_sr = subreddits[0] if subreddits else g.default_sr
|
||||
if c.default_sr:
|
||||
self.default_sr = None
|
||||
else:
|
||||
self.default_sr = c.site.name
|
||||
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
<%namespace file="utils.html" import="error_field, submit_form, plain_link, text_with_links, reddit_selector"/>
|
||||
<%namespace name="utils" file="utils.html"/>
|
||||
|
||||
%if c.on_default_sr:
|
||||
<h1>${_("submit to reddit")}</h1>
|
||||
%else:
|
||||
<h1>${_("submit to %(sr)s") % dict(sr=thing.default_sr)}</h1>
|
||||
%endif
|
||||
<h1>${_("submit to %(sr)s") % dict(sr=thing.default_sr if not thing.on_default_sr else _("reddit"))}</h1>
|
||||
|
||||
<%utils:submit_form onsubmit="return post_form(this, 'submit', linkstatus, null, true)"
|
||||
action=${add_sr("/submit")},
|
||||
|
||||
Reference in New Issue
Block a user