Merge branch 'improve_registration' of github.com:Gluejar/regluit into improve_registration

Conflicts:
	static/css/book_panel.css
	static/css/registration2.css
pull/1/head
Andromeda Yelton 2013-03-22 11:25:06 -04:00
commit 750ced0686
9 changed files with 107 additions and 5 deletions

View File

@ -0,0 +1,78 @@
{% extends "registration/registration_base.html" %}
{% load humanize %}
{% block title %}Pledge Step 1: Login or Create an Account{% endblock %}
{% block news %}
{% endblock %}
{% block extra_css %}
<style>
.widecolumn {
width: 80%;
margin: 0 auto;
}
.halfcolumn1 {
float: left;
clear: left;
}
.halfcolumn2 {
float: right;
clear: right;
}
</style>
{% endblock %}
{% block extra_js %}
{{ block.super }}
<script type="text/javascript">
function put_un_in_cookie(){
$j.cookie('un', $j('#id_username_main').val(), {path: '/', expires: 90 });
return true;
}
</script>
{% endblock %}
{% block content %}
<div class="jsmodule rounded clearfix widecolumn">
<h3>You'll need an account, since we won't charge your card unless the campaign succeeds!</h3>
<div class="halfcolumn2 login_box">
<h3>Get an Unglue.it account:</h3>
<p>... we just have to confirm your email address.</p>
<form class="login" action='{% url registration_register %}' method='post' onsubmit="return put_un_in_cookie();">{% csrf_token %}
<div class="user-name">
<label>Username</label>
<input id="id_username_main" type="text" class="required" name="username" maxlength="30" size="30" />
</div>
<div class="email">
<label>Email</label>
<input id="id_email_main" type="text" class="required" name="email" maxlength="75" size="30" />
</div>
<div class="password">
<label>Password</label>
<input id="id_password1_main" type="password" class="required" name="password1" size="30" />
</div>
<div class="password">
<label>Password (again):</label>
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
</div>
<div class="button">
<input type="submit" class="signup" value="Sign Up" />
</div>
</form>
</div>
<div class="halfcolumn1 login_box">
<h3>Use Google to Sign In:</h3>
<div class="google_signup{% if socials.google %} errorlist{% endif %}">
<div><a href="/socialauth/login/google?next={{ next }}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png" alt="google" /> Sign In with Google</a></div>
</div>
</div>
<div class="halfcolumn1 login_box">
<h3>Already Have an Unglue.it Account?</h3>
<a href="{% url auth_password_reset %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Forgot</a> your password? </li>
{% include "login_form.html" %}
</div>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block extra_css %}
<link rel="stylesheet" href="/static/css/book_list.css">
<link rel="stylesheet" href="/static/css/book_panel.css">
<link rel="stylesheet" href="/static/css/book_panel2.css">
<link rel="stylesheet" href="/static/css/search.css">
{% endblock %}
{% block extra_head %}

View File

@ -64,7 +64,7 @@ urlpatterns = patterns(
url(r"^googlebooks/(?P<googlebooks_id>.+)/$", "googlebooks", name="googlebooks"),
url(r"^donation/$", login_required(DonationView.as_view()), name="donation"),
url(r"^donation/credit/(?P<token>.+)/$", login_required(DonationCredit.as_view()), name="donation_credit"),
url(r"^pledge/(?P<work_id>\d+)/$", login_required(PledgeView.as_view()), name="pledge"),
url(r"^pledge/(?P<work_id>\d+)/$", login_required(PledgeView.as_view(),login_url='/accounts/login/pledge/'), name="pledge"),
url(r"^pledge/cancel/(?P<campaign_id>\d+)$", login_required(PledgeCancelView.as_view()), name="pledge_cancel"),
url(r"^pledge/complete/$", login_required(PledgeCompleteView.as_view()), name="pledge_complete"),
url(r"^pledge/modified/$", login_required(PledgeModifiedView.as_view()), name="pledge_modified"),

View File

@ -153,7 +153,7 @@ def superlogin(request, **kwargs):
extra_context={"socials":user.profile.social_auths}
except:
pass
return login(request, extra_context=extra_context, authentication_form=AuthForm)
return login(request, extra_context=extra_context, authentication_form=AuthForm, **kwargs)
def work(request, work_id, action='display'):
work = safe_get_work(work_id)

View File

@ -193,6 +193,7 @@ EMAIL_HOST = 'smtp.gluejar.com'
DEFAULT_FROM_EMAIL = 'notices@gluejar.com'
SERVER_EMAIL = 'notices@gluejar.com'
ACCOUNT_ACTIVATION_DAYS = 30
SESSION_COOKIE_AGE = 3628800 # 6 weeks
# django-socialauth
AUTHENTICATION_BACKENDS = (

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#login_centerer{padding:10px 25%;width:960px}#registration{width:960px;padding:10px;margin:0 auto;padding:10px 0;font-size:13px;line-height:19.5px}#registration .helptext{font-style:italic}#registration .helptext:before{white-space:pre;content:"\A"}#login{border:solid 3px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:10px auto;float:left;padding:10px;width:50%}#login .google_signup{padding:14px 0}#login .google_signup div{height:32px;line-height:32px;float:left;padding-left:5px;font-size:15px;display:inline-block}#login .google_signup img{float:left;height:32px;width:32px}#login input[type="text"],#login input[type="password"]{width:90%}.actionbutton{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0;float:left}#welcomesearch label{display:block;margin:0 auto;font-size:19px;padding-bottom:10px}#welcomesearch p{margin-bottom:5px}#welcomesearch form{margin:0 auto;width:210px;background:url("/static/images/landingpage/search-box-two.png") 0 0 no-repeat;height:36px;display:block;overflow:hidden}#welcomesearch input.inputbox{border:0;color:#66942e;height:26px;line-height:26px;font-size:13px;float:left;padding:0;margin:5px 0 5px 20px;width:149px;outline:0}#welcomesearch input.inputbox:focus{border:0}#welcomesearch input.greenbutton[type="submit"]{background:url("/static/images/landingpage/search-button-two.png") 0 0 no-repeat;width:40px;height:40px;padding:0;margin:0;border:0;display:block;float:right;text-indent:-10000px;font-size:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.welcomealternatives{border-top:1px solid #d6dde0;margin-top:10px;padding-top:5px}label:before{content:"\A";white-space:pre}
.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#login_centerer{padding:10px 25%;width:960px}#registration{width:960px;padding:10px;margin:0 auto;padding:10px 0;font-size:13px;line-height:19.5px}#registration .helptext{font-style:italic}#registration .helptext:before{white-space:pre;content:"\A"}.login_box{border:solid 3px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:10px auto;padding:10px;width:45%}.login_box .google_signup{padding:14px 0}.login_box .google_signup div{height:48px;line-height:48px;float:left;padding-left:5px;font-size:15px;display:inline-block}.login_box .google_signup img{float:left;height:48px;width:48px}.login_box .google_signup img{margin-right:15px}.login_box .google_signup a{font-size:20px}.login_box input[type="text"],.login_box input[type="password"]{width:90%}#login{border:solid 3px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:10px auto;float:left;padding:10px;width:50%}#login .google_signup{padding:14px 0}#login .google_signup div{height:32px;line-height:32px;float:left;padding-left:5px;font-size:15px;display:inline-block}#login .google_signup img{float:left;height:32px;width:32px}#login input[type="text"],#login input[type="password"]{width:90%}.actionbutton{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0;float:left}#welcomesearch label{display:block;margin:0 auto;font-size:19px;padding-bottom:10px}#welcomesearch p{margin-bottom:5px}#welcomesearch form{margin:0 auto;width:210px;background:url("/static/images/landingpage/search-box-two.png") 0 0 no-repeat;height:36px;display:block;overflow:hidden}#welcomesearch input.inputbox{border:0;color:#66942e;height:26px;line-height:26px;font-size:13px;float:left;padding:0;margin:5px 0 5px 20px;width:149px;outline:0}#welcomesearch input.inputbox:focus{border:0}#welcomesearch input.greenbutton[type="submit"]{background:url("/static/images/landingpage/search-button-two.png") 0 0 no-repeat;width:40px;height:40px;padding:0;margin:0;border:0;display:block;float:right;text-indent:-10000px;font-size:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.welcomealternatives{border-top:1px solid #d6dde0;margin-top:10px;padding-top:5px}label:before{content:"\A";white-space:pre}

View File

@ -23,6 +23,28 @@
}
}
.login_box {
border: solid 3px @blue-grey;
.one-border-radius(5px);
margin: 10px auto;
padding: 10px;
width: 45%;
.google_signup {
.google_signup_div(48px);
img {
margin-right: 15px;
}
a {
font-size: 20px;
}
}
input[type="text"], input[type="password"] {
width: 90%;
}
}
#login {
border: solid 3px @blue-grey;
.one-border-radius(5px);

View File

@ -14,6 +14,8 @@ sitemaps = {
urlpatterns = patterns('',
url(r'^accounts/activate/complete/$',superlogin,
{'template_name': 'registration/activation_complete.html'}),
url(r'^accounts/login/pledge/$',superlogin,
{'template_name': 'registration/from_pledge.html'}),
(r'^accounts/edit/$', 'regluit.frontend.views.edit_user'),
(r'^accounts/', include('registration.backends.default.urls')),
(r'^socialauth/', include('social_auth.urls')),