mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Display privacy philosophy on registration form.
This commit is contained in:
@@ -508,6 +508,7 @@ diff3_temp_location =
|
||||
# -- policy wiki pages --
|
||||
wiki_page_privacy_policy = privacypolicy
|
||||
wiki_page_user_agreement = useragreement
|
||||
wiki_page_registration_info = registration_info
|
||||
|
||||
# Template names to record render timings for
|
||||
timed_templates = Reddit, Link, Comment, LinkListing, NestedListing, SubredditTopBar
|
||||
|
||||
@@ -187,6 +187,7 @@ class Globals(object):
|
||||
],
|
||||
|
||||
ConfigValue.str: [
|
||||
'wiki_page_registration_info',
|
||||
'wiki_page_privacy_policy',
|
||||
'wiki_page_user_agreement',
|
||||
],
|
||||
|
||||
@@ -32,6 +32,7 @@ from r2.models.token import OAuth2Client, OAuth2AccessToken
|
||||
from r2.models import traffic
|
||||
from r2.models import ModAction
|
||||
from r2.models import Thing
|
||||
from r2.models.wiki import WikiPage
|
||||
from r2.config import cache
|
||||
from r2.config.extensions import is_api
|
||||
from r2.lib.menus import CommentSortMenu
|
||||
@@ -42,8 +43,17 @@ from pylons.controllers.util import abort
|
||||
from r2.lib import media, inventory
|
||||
from r2.lib import promote, tracking
|
||||
from r2.lib.captcha import get_iden
|
||||
from r2.lib.filters import spaceCompress, _force_unicode, _force_utf8
|
||||
from r2.lib.filters import unsafe, websafe, SC_ON, SC_OFF, websafe_json
|
||||
from r2.lib.filters import (
|
||||
spaceCompress,
|
||||
_force_unicode,
|
||||
_force_utf8,
|
||||
unsafe,
|
||||
websafe,
|
||||
SC_ON,
|
||||
SC_OFF,
|
||||
websafe_json,
|
||||
wikimarkdown,
|
||||
)
|
||||
from r2.lib.menus import NavButton, NamedButton, NavMenu, PageNameNav, JsButton
|
||||
from r2.lib.menus import SubredditButton, SubredditMenu, ModeratorMailButton
|
||||
from r2.lib.menus import OffsiteButton, menu, JsNavMenu
|
||||
@@ -941,11 +951,22 @@ class Login(Templated):
|
||||
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(),
|
||||
is_popup=is_popup)
|
||||
is_popup=is_popup,
|
||||
registration_info=RegistrationInfo())
|
||||
|
||||
class Register(Login):
|
||||
pass
|
||||
|
||||
|
||||
class RegistrationInfo(Templated):
|
||||
def __init__(self):
|
||||
wp = WikiPage.get(Frontpage, g.wiki_page_registration_info)
|
||||
html = unsafe(
|
||||
wikimarkdown(wp.content, include_toc=False, target='_blank')
|
||||
)
|
||||
Templated.__init__(self, content_html=html)
|
||||
|
||||
|
||||
class OAuth2AuthorizationPage(BoringPage):
|
||||
def __init__(self, client, redirect_uri, scope, state, duration):
|
||||
if duration == "permanent":
|
||||
|
||||
@@ -2038,13 +2038,22 @@ li.searchfacet {
|
||||
.divide { border-right: 2px solid #D3D3D3; margin-right: -2px; }
|
||||
|
||||
.login-form-section {
|
||||
float: left;
|
||||
width: 46%;
|
||||
position: relative;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
|
||||
&.register {
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
&.login {
|
||||
width: 36%;
|
||||
}
|
||||
}
|
||||
|
||||
.login-form-section h3 {
|
||||
.login-form-section > h3 {
|
||||
margin-bottom: 0;
|
||||
margin-top: 10px;
|
||||
font-size: large;
|
||||
@@ -2059,6 +2068,24 @@ li.searchfacet {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-form-section.register .registration-info {
|
||||
position: absolute;
|
||||
left: 53%;
|
||||
width: 40%;
|
||||
min-width: 20em;
|
||||
margin-top: 1.25em;
|
||||
color: #777;
|
||||
|
||||
.md {
|
||||
font-size: 1.1em;
|
||||
|
||||
li {
|
||||
list-style-type: disc;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-form label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
@@ -2070,7 +2097,7 @@ li.searchfacet {
|
||||
}
|
||||
|
||||
.user-form .error {
|
||||
margin-left: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.user-form .remember { display:inline; margin-left: 5px; }
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
%else:
|
||||
${login_panel(login_form,
|
||||
user_reg = thing.user_reg, user_login = thing.user_login,
|
||||
dest=thing.dest)}
|
||||
dest=thing.dest,
|
||||
registration_info=thing.registration_info)}
|
||||
%if not thing.is_popup and not g.disable_captcha:
|
||||
<script type="text/javascript">
|
||||
$.request("new_captcha");
|
||||
@@ -140,12 +141,17 @@
|
||||
</%def>
|
||||
|
||||
|
||||
<%def name="login_panel(lf, user_reg = '', user_login = '', dest='')">
|
||||
<div class="login-form-section divide">
|
||||
<%def name="login_panel(lf, user_reg = '', user_login = '', dest='', registration_info=None)">
|
||||
<div class="login-form-section divide register">
|
||||
<h3>${_("create a new account")}</h3>
|
||||
<p class="tagline">
|
||||
${_("all it takes is a username and password")}
|
||||
</p>
|
||||
%if registration_info:
|
||||
<div class="registration-info">
|
||||
${thing.registration_info}
|
||||
</div>
|
||||
%endif
|
||||
${lf(register=True, user=user_reg, dest=dest)}
|
||||
<p>
|
||||
<span class="orangered">
|
||||
@@ -153,7 +159,7 @@
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="login-form-section">
|
||||
<div class="login-form-section login">
|
||||
<h3>${_("login")}</h3>
|
||||
<p class="tagline">
|
||||
${_("already have an account and just want to login?")}
|
||||
|
||||
1
r2/r2/templates/registrationinfo.html
Normal file
1
r2/r2/templates/registrationinfo.html
Normal file
@@ -0,0 +1 @@
|
||||
${thing.content_html}
|
||||
Reference in New Issue
Block a user