mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-31 09:48:01 -05:00
Link to the subreddit in the submit form title.
This commit is contained in:
@@ -1781,12 +1781,10 @@ class NewLink(Templated):
|
||||
|
||||
self.sr_searches = simplejson.dumps(popular_searches())
|
||||
|
||||
self.on_default_sr = c.default_sr
|
||||
|
||||
if c.default_sr:
|
||||
self.default_sr = None
|
||||
else:
|
||||
self.default_sr = c.site.name
|
||||
self.default_sr = c.site
|
||||
|
||||
Templated.__init__(self, captcha = captcha, url = url,
|
||||
title = title, subreddits = subreddits,
|
||||
|
||||
@@ -26,10 +26,16 @@
|
||||
from r2.lib.template_helpers import add_sr
|
||||
%>
|
||||
|
||||
<%namespace file="utils.html" import="error_field, submit_form, plain_link, reddit_selector"/>
|
||||
<%namespace file="utils.html" import="error_field, submit_form, _a_buffered, reddit_selector"/>
|
||||
<%namespace name="utils" file="utils.html"/>
|
||||
|
||||
<h1>${_("submit to %(sr)s") % dict(sr=thing.default_sr if not thing.on_default_sr else _("reddit"))}</h1>
|
||||
<%
|
||||
if thing.default_sr:
|
||||
sr = " " + _a_buffered(thing.default_sr.name, href=thing.default_sr.path)
|
||||
else:
|
||||
sr = _("reddit")
|
||||
%>
|
||||
<h1>${unsafe(_("submit to %(sr)s") % dict(sr=sr))}</h1>
|
||||
|
||||
<%utils:submit_form onsubmit="return post_form(this, 'submit', linkstatus, null, true)"
|
||||
action=${add_sr("/submit")},
|
||||
@@ -92,7 +98,7 @@ ${thing.formtabs_menu}
|
||||
|
||||
<div class="spacer">
|
||||
<%utils:round_field title="${_('choose a subreddit')}" id="reddit-field">
|
||||
${reddit_selector(thing.default_sr, thing.sr_searches, thing.subreddits)}
|
||||
${reddit_selector(thing.default_sr.name if thing.default_sr else None, thing.sr_searches, thing.subreddits)}
|
||||
</%utils:round_field>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user