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

pull/1/head
Raymond Yee 2012-11-26 14:36:40 -08:00
commit 41f3da3d31
10 changed files with 135 additions and 1354 deletions

View File

@ -92,6 +92,17 @@
<li>
<a href="#"><span id="welcome">Hi, {{ user.username }}</span></a>
</li>
<li>
{% if user.profile.pic_url %}
<img class="user-avatar" src="{{ user.profile.pic_url }}" height=36 width="36" alt="Picture of {{ user.username }}" title="{{ user.username }}" />
{% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="36" width="36" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
{% if unseen_count %}
<a href="/notification"><span id="i_haz_notifications_badge">{{ unseen_count }}</span></a>
{% endif %}
</li>
</ul>
<ul id="user_menu">
<li><a href="{% url supporter supporter_username=user.username %}">Wishlist</a></li>
<li>
@ -104,23 +115,9 @@
</a>
</li>
<li><a href="{% url supporter supporter_username=user.username %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a href="{% url manage_account %}"><span>Account Settings</span></a></li>
<li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li>
<li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li>
</ul>
<li>
{% if user.profile.pic_url %}
<img class="user-avatar" src="{{ user.profile.pic_url }}" height=36 width="36" alt="Picture of {{ user.username }}" title="{{ user.username }}" />
{% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="36" width="36" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
{% if unseen_count %}
<a href="/notification"><span id="i_haz_notifications_badge">{{ unseen_count }}</span></a>
{% endif %}
</li>
{% comment %}
{% endcomment %}
</ul>
</div>
{% else %}
<div class="js-topmenu">

View File

@ -32,7 +32,7 @@
<p><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b> raised</p>
<p><b>${{ work.last_campaign.target|floatformat:0|intcomma }}</b> needed</p>
<p>by {{ deadline|naturalday:"M d, Y" }}</p>
<a href="/pledge/{{workid}}"><div class="read_itbutton pledge"><span>Support</span></div></a>
<a href="{% url pledge work_id=workid %}"><div class="read_itbutton pledge"><span>Pledge</span></div></a>
{% else %}{% if status == 'INITIALIZED' %}
<p>Campaign coming soon!</p>
@ -129,7 +129,7 @@
</div>
{% else %}{% ifequal supporter request.user %}
<div class="listview panelfront side1 remove-wishlist">
<span id="l{{ workid }}">Remove This</span>
<span id="l{{ workid }}">Un-wishlist</span>
</div>
{% else %}{% if work in wishlist %}
<div class="listview panelfront side1 on-wishlist">
@ -137,11 +137,15 @@
</div>
{% else %}
<div class="listview panelfront side1 add-wishlist">
{% if on_search_page %}
<span class="gb_id" id="l{{ googlebooks_id }}">Add to Wishlist</span>
{% else %}
<span class="work_id" id="l{{ workid }}">Add to Wishlist</span>
{% endif %}
{% ifequal status "ACTIVE" %}
<span class="booklist_pledge"><a href="{% url pledge work_id=workid %}" class="fakeinput">Pledge</a></span>
{% else %}
{% if on_search_page %}
<span class="gb_id" id="l{{ googlebooks_id }}">Add to Wishlist</span>
{% else %}
<span class="work_id" id="l{{ workid }}">Add to Wishlist</span>
{% endif %}
{% endifequal %}
</div>
{% endif %}{% endifequal %}{% endif %}{% endif %}

View File

@ -6,7 +6,7 @@
<li class="first parent">
<span class="faq">How do I pledge?</span>
<span class="menu level2 answer">
Enter your pledge amount and select a premium. (You may select a premium at any level up to and including the amount you pledge.) If you pledge enough, you're also eligible to be credited in the unglued ebook and to include a dedication, and toward the bottom of this page you can specify what you'd like those to say. After you click Pledge, we'll collect your credit card information.
Enter your pledge amount and select a premium. (You may select a premium at any level up to and including the amount you pledge.) If you pledge enough, you're also eligible to be credited in the unglued ebook and to include a dedication, and toward the bottom of this page you can specify what you'd like those to say. If this is your first pledge, we'll collect your card information after you click Pledge Now. Otherwise, we'll use the card you used last time -- no need to type in your info again!
</span>
</li>
@ -20,21 +20,28 @@
<li class="parent">
<span class="faq">When will I be charged?</span>
<span class="menu level2 answer">
Campaigns succeed if they reach their target price by their deadline. If this campaign succeeds, you'll be charged within a day of when it reaches its target. If it does not, your pledge will expire on {{ campaign.deadline }} (Eastern US time) and you will not be charged.
If this campaign reaches its target before its deadline ({{ campaign.deadline }}), you'll be charged within a day of when the target is reached. Otherwise, your pledge will expire at midnight on {{ campaign.deadline }} (Eastern US time) and you will not be charged.
</span>
</li>
<li class="parent">
<span class="faq">Will I be charged if the campaign doesn't succeed?</span>
<span class="menu level2 answer">
Nope!
</span>
</li>
<li class="parent">
<span class="faq">What if I want to change my pledge?</span>
<span class="menu level2 answer">
You can change or cancel your pledge at any time before the campaign ends. This will be the campaign's deadline ({{ campaign.deadline }}) or midnight (Eastern US time) on the day the campaign succeeds, whichever comes first. Go to <a href="{% url work work.id %}">this book's page</a> and click on the Modify Pledge button.
You can change or cancel your pledge at any time before the campaign ends. This will be the campaign's deadline ({{ campaign.deadline }}) or midnight (Eastern US time) on the day the campaign succeeds, whichever comes first. You can change the credit card you unglue with, too. Go to your <a href="{% url manage_account %}">Account &amp; Pledges page</a> (always accessible under "Hi, {{ request.user.username }}!" in the upper right corner of the site).
</span>
</li>
<li class="last parent">
<span class="faq">How and when will I receive my premiums?</span>
<span class="menu level2 answer">
If the campaign succeeds and you requested a special premium, we will disclose to the rights holder your email address and any premiums you requested. The rights holder will then be in touch with you about how your premiums will be fulfilled. If you asked to be listed in the acknowledgements, this will be part of the unglued ebook, which should be emailed to you within 90 days of the close of the campaign.
If the campaign succeeds and you requested a special premium, we will disclose to the rights holder your email address and any premiums you requested. The rights holder will then be in touch with you about how your premiums will be fulfilled. If you asked to be listed in the acknowledgements, this will be part of the unglued ebook. We'll email you a link to it within 90 days of the close of the campaign.
</span>
</li>

View File

@ -102,84 +102,88 @@ $j(document).ready(function() {
</div>
{% endif %}
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
<h3>Pledge by Credit Card</h3>
{% if request.user.profile.account %}
<p>Unglue.it has a {{ request.user.profile.account.card_type }} credit card on file for you (we use <a href="https://stripe.com/">Stripe</a> to keep your information secure).
The last four digits of the card are {{ request.user.profile.account.card_last4 }}.
</p>
<form action="#" method="POST" id="use-account-form">
<div class="innards">
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.as_p }}
<input id="use_account_submit" name="use_account" type="submit" class="submit-button" value="Complete Pledge" />
</div>
</form>
<p> You can change your credit card info on your <a href="{% url manage_account %}?next={{ request.path }}#your_payment_info">account management page</a>.
</p>
{% else %}
<p>Unglue.it uses <a href="https://stripe.com/">Stripe</a> to securely manage your credit card information.
</p>
<div id="cc_pledge">
<form action="" method="POST" id="payment-form">
{% if request.user.profile.account %}
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
<h3>Pledge by Credit Card</h3>
<p>Unglue.it has a {{ request.user.profile.account.card_type }} credit card on file for you (we use <a href="https://stripe.com/">Stripe</a> to keep your information secure).
The last four digits of the card are {{ request.user.profile.account.card_last4 }}.
</p>
<form action="#" method="POST" id="use-account-form">
<div class="innards">
<div class="clearfix">
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.as_p }}
</div>
<div class="form-row clearfix">
<label>Card Number:</label>
<input id="card_Number" type="text" class="card-number" />
</div>
<div class="form-row clearfix cvc">
<label>CVC:</label>
<input id="card_CVC" type="text" size="4" autocomplete="off" class="card-cvc" /> <span id="cvc_help">(what is this?)</span>
<div id="cvc_answer"><img src="/static/images/cvcimage.jpeg">For most cards, this is a 3-digit number at the end of the signature strip on the back. For American Express, it's a four-digit number in small print on the front.</div>
</div>
<div class="form-row clearfix initial_values">
<label>Expiration:</label>
<input id="card_ExpiryMonth" type="text" size="2" value="MM" class="card-expiry-month" />
<input id="card_ExpiryYear" type="text" size="4" value="YYYY" class="card-expiry-year" />
</div>
<div class="form-row clearfix">
<label>Name:</label>
<input id="card_Name" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Address Line 1:</label>
<input id="card_AddressLine1" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Address Line 2:</label>
<input id="card_AddressLine2" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>City:</label>
<input id="card_AddressCity" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>State/Province :</label>
<input id="card_AddressState" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>ZIP/Postal Code:</label>
<input id="card_AddressZip" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Country:</label>
<input id="card_AddressCountry" type="text" class="address" />
</div>
</div>
<div class="payment-errors"></div>
<input id="cc_submit" type="submit" class="submit-button" value="Complete Pledge" />
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.as_p }}
<input id="use_account_submit" name="use_account" type="submit" class="submit-button" value="Complete Pledge" />
</div>
</form>
</div>
{% endif %}
</div>
</div>
<br />
<p>Want to use a different card? You can change your credit card info on your <a href="{% url manage_account %}?next={{ request.path }}#your_payment_info">Account &amp; Pledges page</a>.
</p>
{% else %}
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
<h3>Pledge by Credit Card</h3>
<p>Unglue.it uses <a href="https://stripe.com/">Stripe</a> to securely manage your credit card information.
</p>
<div id="cc_pledge">
<form action="" method="POST" id="payment-form">
<div class="innards">
<div class="clearfix">
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.as_p }}
</div>
<div class="form-row clearfix">
<label>Card Number:</label>
<input id="card_Number" type="text" class="card-number" />
</div>
<div class="form-row clearfix cvc">
<label>CVC:</label>
<input id="card_CVC" type="text" size="4" autocomplete="off" class="card-cvc" /> <span id="cvc_help">(what is this?)</span>
<div id="cvc_answer"><img src="/static/images/cvcimage.jpeg" alt="a typical credit card with CVC">For most cards, this is a 3-digit number at the end of the signature strip on the back. For American Express, it's a four-digit number in small print on the front.</div>
</div>
<div class="form-row clearfix initial_values">
<label>Expiration:</label>
<input id="card_ExpiryMonth" type="text" size="2" value="MM" class="card-expiry-month" />
<input id="card_ExpiryYear" type="text" size="4" value="YYYY" class="card-expiry-year" />
</div>
<div class="form-row clearfix">
<label>Name:</label>
<input id="card_Name" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Address Line 1:</label>
<input id="card_AddressLine1" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Address Line 2:</label>
<input id="card_AddressLine2" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>City:</label>
<input id="card_AddressCity" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>State/Province :</label>
<input id="card_AddressState" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>ZIP/Postal Code:</label>
<input id="card_AddressZip" type="text" class="address" />
</div>
<div class="form-row clearfix">
<label>Country:</label>
<input id="card_AddressCountry" type="text" class="address" />
</div>
</div>
<div class="payment-errors"></div>
<input id="cc_submit" type="submit" class="submit-button" value="Complete Pledge" />
</form>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -21,7 +21,7 @@ $j(document).ready(function(){
{% include "trans_summary.html" %}
</div></dd>
{% empty %}
<dt> You don't have any active pledges.</dt>
<dt>You don't have any active pledges. To make one, click on a book you'd like to support among our <a href="{% url campaign_list facet="ending" %}">active campaigns</a>. There's a "Support" button on every campaign page, or just click on your favorite premium to get started.</dt>
{% endfor %}
</dl>
<h2 id="your_payment_info">Your Payment Info</h2>

View File

@ -140,7 +140,7 @@ $j(document).ready(function(){
{% if pledged %}
<div class="btn_support modify"><form action="{% url pledge_modify work_id %}" method="get"><input type="submit" value="Modify Pledge" /></form></div>
{% else %}
<div class="btn_support"><form action="{% url pledge work_id %}" method="get"><input type="submit" value="Support" /></form></div>
<div class="btn_support"><form action="{% url pledge work_id %}" method="get"><input type="submit" value="Pledge" /></form></div>
{% endif %}
{% else %}
{% if work.first_ebook %}

View File

@ -149,6 +149,9 @@ div.book-list.listview div.add-wishlist span,
div.book-list.listview div.create-account span {
background: url("/static/images/booklist/add-wishlist.png") left center no-repeat;
}
div.book-list.listview div.add-wishlist span.booklist_pledge {
background: none;
}
div.book-list.listview div.remove-wishlist span {
background: url("/static/images/booklist/remove-wishlist-blue.png") left center no-repeat;
}

File diff suppressed because one or more lines are too long

View File

@ -79,6 +79,10 @@ div.book-list.listview{
background:url("@{image-base}booklist/add-wishlist.png") left center no-repeat;
}
&.add-wishlist span.booklist_pledge {
background: none;
}
&.remove-wishlist span {
background:url("@{image-base}booklist/remove-wishlist-blue.png") left center no-repeat;
}

View File

@ -288,6 +288,7 @@ ul.menu{
ul {
&#user_menu {
white-space:nowrap;
display: none;
z-index: 100;
position: absolute;
@ -301,7 +302,7 @@ ul.menu{
list-style-type: none;
float: none;
background: @blue-grey;
padding: 0 10px;
padding: 7px 10px;
&:hover {
background: @call-to-action;
@ -314,7 +315,15 @@ ul.menu{
background-color: white;
color: @text-blue;
}
}
a {
height: auto;
line-height: @font-size-larger*1.75;
}
span {
margin-right: 10px;
}
}
}
@ -375,7 +384,6 @@ ul.menu{
width: 16px;
cursor: pointer;
text-align: center;
margin-left: 10px;
&#i_haz_notifications {
background-color: @call-to-action;