commit
5eaf6f5c73
|
@ -785,13 +785,6 @@ class CCForm(UserCCMixin, BaseCCForm):
|
|||
|
||||
class AccountCCForm( BaseCCMixin, UserCCMixin, forms.Form):
|
||||
pass
|
||||
|
||||
class DonateForm(forms.Form):
|
||||
preapproval_amount = forms.DecimalField( widget=forms.HiddenInput() )
|
||||
username = forms.CharField(max_length=30, required=True, widget=forms.HiddenInput() )
|
||||
work_id = forms.IntegerField(required=False, widget=forms.HiddenInput() )
|
||||
title = forms.CharField(max_length=200, required=False, widget=forms.HiddenInput() )
|
||||
|
||||
|
||||
class GoodreadsShelfLoadingForm(forms.Form):
|
||||
goodreads_shelf_name_number = forms.CharField(widget=forms.Select(choices=(
|
||||
|
|
|
@ -100,9 +100,6 @@ base.html extra_css(empty) extra_js(empty) extra_head(empty)
|
|||
bypub_list.html
|
||||
|
||||
|
||||
nonprofit_base.html extra_extra_head
|
||||
nonprofit.html extra_extra_head
|
||||
|
||||
book_panel_addbutton.html
|
||||
cardform.html
|
||||
cardscripts.html
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load humanize %}
|
||||
{% if request.user.profile.account %}
|
||||
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
|
||||
<div id="authorize" class="clearfix">
|
||||
<h3>{{ action|capfirst }} 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 }}.
|
||||
|
@ -18,7 +18,7 @@
|
|||
<p>Want to use a different card? You can change your credit card info on your <a href="{% url 'manage_account' %}?next={{ request.get_full_path|urlencode }}#your_payment_info">Account & Pledges page</a>.
|
||||
</p>
|
||||
{% else %}
|
||||
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
|
||||
<div id="authorize" class="clearfix">
|
||||
<h3>{{ action|capfirst }} by Credit Card</h3>
|
||||
<p>Unglue.it uses <a href="https://stripe.com/">Stripe</a> to securely manage your credit card information.
|
||||
</p>
|
||||
|
|
|
@ -7,44 +7,5 @@ $j(document).ready(function() {
|
|||
// don't let users modify their pledge amount on this page; it's just here for reference
|
||||
// if they modified it here we'd have to faff about with validating premiums
|
||||
$j('#id_preapproval_amount').prop('disabled', true);
|
||||
|
||||
{% if nonprofit.is_on %}
|
||||
// make the donate/pledge buttons pretty
|
||||
$j("#pledge_option").click(function() {
|
||||
$j("#authorize").show();
|
||||
});
|
||||
|
||||
$j("#donate_area").mouseenter(function() {
|
||||
$j("#donate_explanation").addClass("highlight");
|
||||
});
|
||||
|
||||
$j("#donate_area").mouseleave(function() {
|
||||
$j("#donate_explanation").removeClass("highlight");
|
||||
});
|
||||
|
||||
$j("#donate_explanation").mouseenter(function() {
|
||||
$j("#donate_explanation").addClass("highlight");
|
||||
});
|
||||
|
||||
$j("#donate_explanation").mouseleave(function() {
|
||||
$j("#donate_explanation").removeClass("highlight");
|
||||
});
|
||||
|
||||
$j("#pledge_area").mouseenter(function() {
|
||||
$j("#pledge_explanation").addClass("highlight");
|
||||
});
|
||||
|
||||
$j("#pledge_area").mouseleave(function() {
|
||||
$j("#pledge_explanation").removeClass("highlight");
|
||||
});
|
||||
|
||||
$j("#pledge_explanation").mouseenter(function() {
|
||||
$j("#pledge_explanation").addClass("highlight");
|
||||
});
|
||||
|
||||
$j("#pledge_explanation").mouseleave(function() {
|
||||
$j("#pledge_explanation").removeClass("highlight");
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -15,42 +15,6 @@
|
|||
<div class="jsmodule rounded clearfix central">
|
||||
<div class="jsmod-content">
|
||||
|
||||
{% if nonprofit.is_on %}
|
||||
|
||||
<div class="fund_options clearfix">
|
||||
<div id="donate_area">
|
||||
<form method="GET" action="{{ nonprofit.link }}">
|
||||
{{ donate_form.non_field_errors }}
|
||||
{{ donate_form }}
|
||||
<input name="donate_submit" type="submit" value="Donate" id="donate_submit" class="loader-gif" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="pledge_area">
|
||||
<a class="fakeinput" id="pledge_option">{{ action|capfirst }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fund_options clearfix">
|
||||
<div id="donate_explanation">
|
||||
<ul>
|
||||
<li>Donate to our partner nonprofit, {{ nonprofit.name }}</li>
|
||||
<li>Pay immediately</li>
|
||||
<li>If the campaign succeeds, your gift will support it</li>
|
||||
<li>If not, your gift will support {{ nonprofit.name }}</li>
|
||||
<li><a href="#">Learn more</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="pledge_explanation">
|
||||
<ul>
|
||||
<li>Pledge toward this campaign</li>
|
||||
<li>Pay later, only if this campaign succeeds</li>
|
||||
<li>Your pledge will be used only to support this campaign.</li>
|
||||
<li><a href="#">Learn more</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include 'cardform.html' %}
|
||||
|
||||
|
|
|
@ -39,23 +39,6 @@ You may transfer up to {{ user.credit.available }} gift credits to another Unglu
|
|||
</form>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<h2>About Gift Credits</h2>
|
||||
{% if nonprofit.is_on %}
|
||||
<p>Unglue.it uses donation credits to cooperate with a non-profit charity, {{ nonprofit.name }} in the ungluing of books. When you make a donation to {{ nonprofit.name }}, you can get credits for your donation. Then you can direct how {{ nonprofit.name }} uses your donation in support of ungluing campaigns. You can also transfer your credits to other ungluers. To make a donation, and receive credits, click the button!
|
||||
</p>
|
||||
<div id="donate_charity">
|
||||
|
||||
<form method="GET" action="{{nonprofit.link}}">
|
||||
{{ donate_form.non_field_errors }}
|
||||
{{donate_form}}
|
||||
<input name="donate_submit" type="submit" value="Go Donate!" id="donate_submit" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Gift credits are not turned on yet.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<div><h2>Wrong user for gift credit</h2>
|
||||
<div>
|
||||
<p>Unglue.it would like to process your gift credit, but you are currently logged in as <code>{{request.user.username}}</code>. Your gift credit from {{nonprofit.name}} for ${{ envelope.amount }}.{{ envelope.cents }} is designated for <code>{{ envelope.username }}</code>. To record your credit, you need to <a href='{% url 'auth_logout' %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url 'superlogin' %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ envelope.username }}</code>. If you have any problem, don't hesitate to <a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">contact us</a>.
|
||||
<p>Unglue.it would like to process your gift credit, but you are currently logged in as <code>{{request.user.username}}</code>. Your gift credit for ${{ envelope.amount }}.{{ envelope.cents }} is designated for <code>{{ envelope.username }}</code>. To record your credit, you need to <a href='{% url 'auth_logout' %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url 'superlogin' %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ envelope.username }}</code>. If you have any problem, don't hesitate to <a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">contact us</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
{% extends "nonprofit_base.html" %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}Donate to {{nonprofit.name}}{% endblock %}
|
||||
|
||||
{% block extra_extra_head %}
|
||||
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/static/css/pledge.css" />
|
||||
<link href="/static/stripe/tag.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="/static/stripe/tag.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block doccontent %}
|
||||
<div style="height:15px"></div>
|
||||
|
||||
<div class="jsmodule rounded clearfix">
|
||||
<div class="jsmod-content">
|
||||
|
||||
<div><h1>Supporting <i>{{ get.title }}</i> through {{nonprofit.name}}</h1>
|
||||
<div><p>{{nonprofit.name}} is cooperating with Unglue.it to make books free to the world. On this page, you can make a donation to us, and we'll hold the money until the ungluing campaign you've selected succeeds. Then we'll make a payment to the rightsholder along side unglue.it. Once you've made the donation, we'll ad donation credits to your unglue.it account, <code>{{get.username}}</code>.
|
||||
</p>
|
||||
<p>
|
||||
To fund the pledge of ${{get.preapproval_amount|intcomma}} that you've made at unglue.it, you'll need to make a donation of at least that amount. You can donate more than that of course- you'll get additional donation credits to use on other campaigns. The larger your donation, the less percentage-wise that gets eaten up by processing fees.
|
||||
</p>
|
||||
<p>Any interest we earn will be used for our public purpose of helping libraries remain relevant into the future. If your unglue.it donation credits don't get used for 5 years, we'll use it in the same way. Your donation to {{nonprofit.name}} is deductible as a Charitable donation in the US.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="donate" class="clearfix">
|
||||
<h2>Donate by Credit Card</h2>
|
||||
<p>{{nonprofit.name}} uses Stripe to securely manage your Credit Card information.
|
||||
</p>
|
||||
<div id="cc_pledge">
|
||||
<form method="POST" action="#">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{{form.as_p}}
|
||||
<payment key="{{STRIPE_PK}}"></payment>
|
||||
<input name="cc_submit" type="submit" value="Verify Credit Card" id="cc_submit" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -1,200 +0,0 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
|
||||
|
||||
<head profile="http://gmpg.org/xfn/11">
|
||||
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<title>{% block title %}Join the Movement | Library Renewal{% endblock %}</title>
|
||||
|
||||
<link href="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/stylesheets/blueprint/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
||||
<link href="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/stylesheets/blueprint/print.css" media="print" rel="stylesheet" type="text/css" />
|
||||
<!--[if IE]><link href="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/stylesheets/blueprint/ie.css" media="screen, projection" rel="stylesheet" type="text/css" /><![endif]-->
|
||||
<link rel="stylesheet" href="http://libraryrenewal.org/wp-content/themes/library-renewal/style.css" type="text/css" media="screen" />
|
||||
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="Library Renewal RSS Feed" href="http://libraryrenewal.org/feed/" />
|
||||
<link rel="alternate" type="application/atom+xml" title="Library Renewal Atom Feed" href="http://libraryrenewal.org/feed/atom/" />
|
||||
<link rel="pingback" href="http://libraryrenewal.org/xmlrpc.php" />
|
||||
|
||||
|
||||
<link rel='stylesheet' id='twitter-pro-css' href='http://libraryrenewal.org/wp-content/plugins/twitter-widget-premium/resources/style.css?ver=3.4.1' type='text/css' media='all' />
|
||||
<link rel='stylesheet' id='sp-gallery-css' href='http://libraryrenewal.org/wp-content/plugins/simple_wp_gallery/resources/sp-gallery.css?ver=3.4.1' type='text/css' media='all' />
|
||||
<link rel='stylesheet' id='NextGEN-css' href='http://libraryrenewal.org/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />
|
||||
<link rel='stylesheet' id='shutter-css' href='http://libraryrenewal.org/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.css?ver=1.3.2' type='text/css' media='screen' />
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-content/plugins/simple_wp_gallery/resources/jquery.cycle.min.js?ver=2.86'></script>
|
||||
<script type='text/javascript'>
|
||||
/* <![CDATA[ */
|
||||
var shutterSettings = {"msgLoading":"L O A D I N G","msgClose":"Click to Close","imageCount":"1"};
|
||||
/* ]]> */
|
||||
</script>
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js?ver=1.3.2'></script>
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.05'></script>
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-includes/js/comment-reply.js?ver=3.4.1'></script>
|
||||
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://libraryrenewal.org/xmlrpc.php?rsd" />
|
||||
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://libraryrenewal.org/wp-includes/wlwmanifest.xml" />
|
||||
<link rel='prev' title='About Us' href='http://libraryrenewal.org/about/' />
|
||||
<link rel='next' title='Events/Research' href='http://libraryrenewal.org/events/' />
|
||||
<meta name="generator" content="WordPress 3.4.1" />
|
||||
|
||||
<!-- All in One SEO Pack 1.6.13.3 by Michael Torbert of Semper Fi Web Design[275,324] -->
|
||||
<link rel="canonical" href="http://libraryrenewal.org/join-the-movement/" />
|
||||
<!-- /all in one seo pack -->
|
||||
<!--[if lt IE 8]><link rel="stylesheet" href="http://libraryrenewal.org/wp-content/plugins/simple_wp_gallery/resources/ie7.css" type="text/css" media="screen"><![endif]-->
|
||||
<!--[if IE 8]><link rel="stylesheet" href="http://libraryrenewal.org/wp-content/plugins/simple_wp_gallery/resources/ie8.css" type="text/css" media="screen"><![endif]-->
|
||||
<link rel="stylesheet" href="http://libraryrenewal.org/wp-content/plugins/socialpop/socialpop-styles.css" type="text/css" media="screen" title="no title" charset="utf-8" />
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var sps_style = "popup";
|
||||
var sps_box = "no";
|
||||
var sps_boxfloat = "left";
|
||||
var sps_title = "Share!";
|
||||
var sps_notitle = "no";
|
||||
var sps_holder = "gray";
|
||||
var sps_bgcolor = "ffffff";
|
||||
-->
|
||||
</script>
|
||||
<script src="http://libraryrenewal.org/wp-content/plugins/socialpop/socialpop.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="http://libraryrenewal.org/wp-content/plugins/socialpop/script.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<meta name='NextGEN' content='1.8.2' />
|
||||
{% block extra_extra_head %}{% endblock %}
|
||||
|
||||
</head>
|
||||
|
||||
<body class="page page-id-7 page-template-default" >
|
||||
|
||||
<div id="header" class="container">
|
||||
<h2 id="logo"><a href="http://libraryrenewal.org">Library Renewal</a></h2>
|
||||
<ul id="global-menu">
|
||||
<li class="page_item page-item-2"><a href="http://libraryrenewal.org/about/" title="About Us">About Us</a></li>
|
||||
<li class="page_item page-item-7"><a href="http://libraryrenewal.org/join-the-movement/" title="Join the Movement">Join</a></li>
|
||||
<li class="page_item page-item-7"><a href="http://libraryrenewal.myshopify.com/" title="Store & Donation Center">Store</a></li>
|
||||
<li class="page_item page-item-9"><a href="http://libraryrenewal.org/events/" title="Events">Events</a></li>
|
||||
<li class="page_item page-item-11"><a href="http://libraryrenewal.org/support/" title="Support">Support Us</a></li>
|
||||
<li class="page_item page-item-53"><a href="http://libraryrenewal.org/blog/" title="Blog">Blog</a></li>
|
||||
<li class="page_item page-item-13"><a href="http://libraryrenewal.org/contact/" title="Contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="content" class="container" style="border:none">
|
||||
<div class="post" id="post-7">
|
||||
|
||||
<!-- SIDEBAR -->
|
||||
|
||||
<div id="sidebar" class="span-4 append-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="callout">
|
||||
<h3>Join the Movement</h3>
|
||||
<p>We are making library renewal happen together. Give us feedback and interact with your colleagues to create the library access your community needs today.</p>
|
||||
<a href="/join-the-movement" class="btn">Join the Movement</a>
|
||||
</div>
|
||||
|
||||
<div class="callout">
|
||||
<h3>Search the Site</h3>
|
||||
<form method="get" action="http://www.libraryrenewal.org/?">
|
||||
<input class="text" type="text" name="s" style="width:130px" >
|
||||
<p class="clear clearfix"><button type="submit" class="button positive"><img alt="Search the Site" height="16" src="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/images/folder_magnify.png" title="" width="16" />Search</button></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="callout">
|
||||
<h3>Library Renewal Posters</h3>
|
||||
<a href="http://libraryrenewal.myshopify.com/collections/posters/"><img src="http://www.libraryrenewal.org/wp-content/uploads/2010/12/Cricket-Press-LR-sketches-2-197x300.jpg" style="width:150px"></a>
|
||||
<a href="http://libraryrenewal.myshopify.com/collections/posters/" class="btn">Browse Posters</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-19 last">
|
||||
|
||||
{% block doccontent %}{% endblock %}
|
||||
|
||||
<div id="lk-plugin"><div class="socialpop-container sps-solo">
|
||||
<ul class="socialpop-list">
|
||||
<li><a href="http://delicious.com/save?url={{ nonprofit.link|urlencode }}" onclick="window.open(this.href);return false;"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/delicious.png" width="32" height="32" alt="Delicious" title="Delicious" /></a></li>
|
||||
<li><a href="http://digg.com/submit?url={{ nonprofit.link|urlencode }}" onclick="window.open(this.href);return false;"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/digg.png" width="32" height="32" alt="Digg" title="Digg" /></a></li>
|
||||
<li><a href="mailto:?subject=Join the Movement&body={{ nonprofit.link|urlencode }}"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/email.png" width="32" height="32" alt="E-Mail" title="E-Mail" /></a></li>
|
||||
<li><a href="http://www.facebook.com/sharer.php?u={{ nonprofit.link|urlencode }}"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/facebook.png" width="32" height="32" alt="Facebook" title="Facebook" /></a></li>
|
||||
<li><a href="http://www.google.com/buzz/post?url={{ nonprofit.link|urlencode }}"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/google-buzz.png" width="32" height="32" alt="Google Buzz" title="Google Buzz" /></a></li>
|
||||
<li><a href="http://www.linkedin.com/shareArticle?mini=true&url={{ nonprofit.link|urlencode }}&message=Join+the+Movement"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/linkedin.png" width="32" height="32" alt="LinkedIn" title="LinkedIn" /></a></li>
|
||||
<li><a href="http://www.stumbleupon.com/submit?url={{ nonprofit.link|urlencode }}&title=Join+the+Movement"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/stumbleupon.png" width="32" height="32" alt="StumbleUpon" title="StumbleUpon" /></a></li>
|
||||
<li><a href="http://twitter.com/home?status=Join+the+Movement+{{ nonprofit.link|urlencode }}"><img src="http://libraryrenewal.org/wp-content/plugins/socialpop/images/icons/24px_altered/twitter.png" width="32" height="32" alt="Twitter" title="Twitter" /></a></li>
|
||||
|
||||
</ul>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="container">
|
||||
|
||||
<ul>
|
||||
|
||||
<li class="page_item page-item-2"><a href="http://libraryrenewal.org/about/" title="About Us">About Us</a></li>
|
||||
|
||||
<li class="page_item page-item-7"><a href="http://libraryrenewal.org/posters/" title="Join the Movement">Join the Movement</a></li>
|
||||
|
||||
<li class="page_item page-item-9"><a href="http://libraryrenewal.org/events/" title="Events">Events</a></li>
|
||||
|
||||
<li class="page_item page-item-11"><a href="http://libraryrenewal.org/support/" title="Support">Support Us</a></li>
|
||||
|
||||
<li class="page_item page-item-53"><a href="http://libraryrenewal.org/blog/" title="Blog">Blog</a></li>
|
||||
|
||||
<li class="page_item page-item-13"><a href="http://libraryrenewal.org/contact/" title="Contact">Contact</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Copyright © 2010 Library Renewal | Built With Pride by <a href="http://www.commercekitchen.com" target="_new">www.commercekitchen.com</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="share-container-outer">
|
||||
|
||||
<div id="share-container-inner">
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://www.facebook.com/libraryrenewal" target="_new"><img src="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/images/social-media-icons/facebook.png" width="16" height="16" alt="" title="" /></a></li>
|
||||
|
||||
<li><a href="http://twitter.com/libraryrenewal" target="_new"><img src="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/images/social-media-icons/twitter.png" width="16" height="16" alt="" title="" /></a></li>
|
||||
|
||||
<li><a href="http://libraryrenewal.org/feed/" target="_new"><img src="http://libraryrenewal.org/wp-content/themes/library-renewal/assets/images/social-media-icons/feed.png" width="16" height="16" alt="" title="" /></a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type='text/javascript' src='http://libraryrenewal.org/wp-content/plugins/simple_wp_gallery/resources/sp-gallery.js?ver=3.4.1'></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -26,7 +26,6 @@ from regluit.frontend.views import (
|
|||
InfoLangView,
|
||||
GiftView,
|
||||
FundView,
|
||||
NonprofitCampaign,
|
||||
GiftCredit,
|
||||
PledgeModifiedView,
|
||||
ManageAccount,
|
||||
|
@ -135,7 +134,6 @@ urlpatterns = patterns(
|
|||
url(r"^pledge/recharge/(?P<work_id>\d+)$", login_required(PledgeRechargeView.as_view()), name="pledge_recharge"),
|
||||
url(r"^purchase/(?P<work_id>\d+)/$", login_required(PurchaseView.as_view(),login_url='/accounts/login/purchase/'), name="purchase"),
|
||||
url(r"^purchase/(?P<work_id>\d+)/download/$", "download_purchased", name="download_purchased"),
|
||||
url(r"^donate_to_campaign/$", csrf_exempt(NonprofitCampaign.as_view()), name="nonprofit"),
|
||||
url(r"^subjects/$", "subjects", name="subjects"),
|
||||
url(r"^subjects/map/$", login_required(MapSubjectView.as_view()), name="map_subject"),
|
||||
url(r"^librarything/$", LibraryThingView.as_view(), name="librarything"),
|
||||
|
|
|
@ -94,7 +94,6 @@ from regluit.frontend.forms import (
|
|||
LibraryThingForm,
|
||||
OpenCampaignForm,
|
||||
getManageCampaignForm,
|
||||
DonateForm,
|
||||
CampaignAdminForm,
|
||||
EmailShareForm,
|
||||
FeedbackForm,
|
||||
|
@ -1167,8 +1166,7 @@ class GiftView(TemplateView):
|
|||
return self.render_to_response(context)
|
||||
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
context = {'user' : self.request.user,'nonprofit': settings.NONPROFIT}
|
||||
context['donate_form'] = DonateForm(initial={'username':self.request.user.username})
|
||||
context = {'user' : self.request.user}
|
||||
return context
|
||||
|
||||
class PledgeView(FormView):
|
||||
|
@ -1250,7 +1248,6 @@ class PledgeView(FormView):
|
|||
"""set up the pledge page"""
|
||||
|
||||
context = super(PledgeView, self).get_context_data(**kwargs)
|
||||
context['nonprofit'] = settings.NONPROFIT
|
||||
|
||||
context.update({
|
||||
'work':self.work,
|
||||
|
@ -1340,7 +1337,9 @@ class PurchaseView(PledgeView):
|
|||
'offer_id': self.offer_id,
|
||||
}
|
||||
if self.request.method == 'POST':
|
||||
self.data.update(self.request.POST.dict())
|
||||
data = self.request.POST.dict()
|
||||
data.update(self.data)
|
||||
self.data = data
|
||||
self.data['give'] = self.give
|
||||
if not self.request.POST.has_key('anonymous'):
|
||||
del self.data['anonymous']
|
||||
|
@ -1426,14 +1425,8 @@ class FundView(FormView):
|
|||
context['preapproval_amount']=self.transaction.max_amount
|
||||
context['needed'] = self.transaction.needed_amount
|
||||
context['transaction']=self.transaction
|
||||
context['nonprofit'] = settings.NONPROFIT
|
||||
context['STRIPE_PK'] = stripelib.STRIPE_PK
|
||||
context['action'] = self.action
|
||||
if settings.NONPROFIT.is_on:
|
||||
# note that get_form_kwargs() will already have been called once
|
||||
donate_args=self.get_form_kwargs()
|
||||
donate_args['data']['preapproval_amount']=self.transaction.needed_amount
|
||||
context['donate_form'] = DonateForm(**donate_args)
|
||||
return context
|
||||
|
||||
def form_valid(self, form):
|
||||
|
@ -1480,42 +1473,12 @@ class FundView(FormView):
|
|||
else:
|
||||
return render(self.request, "pledge_card_error.html", {'transaction': self.transaction })
|
||||
|
||||
class NonprofitCampaign(FormView):
|
||||
template_name="nonprofit.html"
|
||||
form_class = CCForm
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(NonprofitCampaign, self).get_context_data(**kwargs)
|
||||
context['nonprofit'] = settings.NONPROFIT
|
||||
context['get'] = self.request.GET
|
||||
return context
|
||||
|
||||
def get_form_kwargs(self):
|
||||
if self.request.method == 'POST':
|
||||
return {'data':self.request.POST}
|
||||
else:
|
||||
return {'initial':self.request.GET }
|
||||
|
||||
|
||||
|
||||
def form_valid(self, form):
|
||||
username=form.cleaned_data['username']
|
||||
forward={'username':username}
|
||||
forward['work_id']= form.cleaned_data['work_id']
|
||||
amount=form.cleaned_data['preapproval_amount']
|
||||
forward['cents']=int(100*(amount-int(amount)))
|
||||
forward['amount']= int(amount)
|
||||
forward['sent']= Sent.objects.create(user=username,amount=form.cleaned_data['preapproval_amount']).pk
|
||||
token=signing.dumps(forward)
|
||||
return HttpResponseRedirect(settings.BASE_URL_SECURE + reverse('gift_credit',kwargs={'token':token}))
|
||||
|
||||
class GiftCredit(TemplateView):
|
||||
template_name="gift_credit.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(GiftCredit, self).get_context_data(**kwargs)
|
||||
context['faqmenu']="gift"
|
||||
context['nonprofit'] = settings.NONPROFIT
|
||||
try:
|
||||
envelope=signing.loads(kwargs['token'])
|
||||
context['envelope']=envelope
|
||||
|
|
|
@ -411,10 +411,6 @@ MAINTENANCE_MODE = False
|
|||
# Sequence of URL path regexes to exclude from the maintenance mode.
|
||||
MAINTENANCE_IGNORE_URLS = {}
|
||||
|
||||
class NONPROFIT:
|
||||
is_on = False
|
||||
name = 'Library Renewal'
|
||||
link = 'http://127.0.0.1:8000/donate_to_campaign/'
|
||||
|
||||
# we should suppress Google Analytics outside of production
|
||||
SHOW_GOOGLE_ANALYTICS = False
|
||||
|
|
|
@ -188,9 +188,6 @@ def test_relaunch(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=True,
|
|||
|
||||
setup_selenium()
|
||||
|
||||
# this assumes that we don't have donation functionality on
|
||||
assert settings.NONPROFIT.is_on == False
|
||||
|
||||
sel = selenium_driver(browser=browser)
|
||||
|
||||
time.sleep(5)
|
||||
|
|
Loading…
Reference in New Issue