diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 54f54b2aa..ac18f6910 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -938,9 +938,10 @@ class PasswordVerificationForm(Templated): class Login(Templated): """The two-unit login and register form.""" - def __init__(self, user_reg = '', user_login = '', dest=''): + def __init__(self, user_reg = '', user_login = '', dest='', is_popup=False): Templated.__init__(self, user_reg = user_reg, user_login = user_login, - dest = dest, captcha = Captcha()) + dest = dest, captcha = Captcha(), + is_popup=is_popup) class Register(Login): pass diff --git a/r2/r2/templates/login.html b/r2/r2/templates/login.html index 3e70a4579..2c9f70d86 100644 --- a/r2/r2/templates/login.html +++ b/r2/r2/templates/login.html @@ -36,7 +36,7 @@ ${login_panel(login_form, user_reg = thing.user_reg, user_login = thing.user_login, dest=thing.dest)} - %if not g.disable_captcha: + %if not thing.is_popup and not g.disable_captcha: diff --git a/r2/r2/templates/reddit.html b/r2/r2/templates/reddit.html index 13f611d79..6bd5e6dc1 100644 --- a/r2/r2/templates/reddit.html +++ b/r2/r2/templates/reddit.html @@ -23,13 +23,12 @@ <%! from r2.lib.template_helpers import add_sr, static, join_urls, class_dict, get_domain from r2.lib.filters import unsafe - from r2.lib.pages import SearchForm, ClickGadget, SideContentBox + from r2.lib.pages import SearchForm, ClickGadget, SideContentBox, Login from r2.lib import tracking from pylons import request from r2.lib.strings import strings from r2.models import make_feedurl, Sub %> -<%namespace file="login.html" import="login_panel, login_form"/> <%namespace file="framebuster.html" import="framebuster"/> <%namespace file="less.html" import="less_js, less_stylesheet"/> <%namespace file="utils.html" import="tags, classes"/> @@ -158,7 +157,7 @@ ${_("close this window")}