Skip to content

Commit

Permalink
Merge pull request #296 from stianjensen/donation-plus
Browse files Browse the repository at this point in the history
Upgrade donation flow
  • Loading branch information
stianjensen committed Nov 27, 2014
2 parents 8a51a97 + 99f9f74 commit dd86da2
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 25 deletions.
1 change: 0 additions & 1 deletion wikipendium/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
TEMPLATE_CONTEXT_PROCESSORS = TCP + (
'django.core.context_processors.request',
'wikipendium.wiki.context_processors.google_analytics_processor',
'wikipendium.wiki.context_processors.paypal_processor',
)


Expand Down
3 changes: 0 additions & 3 deletions wikipendium/settings/local.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ CACHES = {
},
}
"""

# Paypal donations
PAYPAL_DONATION_PKCS7 = ''
4 changes: 0 additions & 4 deletions wikipendium/wiki/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ def google_analytics_processor(request):
'GOOGLE_ANALYTICS_NAME': settings.GOOGLE_ANALYTICS_NAME}
except:
return {}


def paypal_processor(request):
return {'PAYPAL_DONATION_PKCS7': settings.PAYPAL_DONATION_PKCS7}
9 changes: 9 additions & 0 deletions wikipendium/wiki/static/css/master.css
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,15 @@ body.article .header-wrapper {
padding: 20px 0 0;
}

#page-footer .donation-appeal label {
margin: 20px;
}

#page-footer .donation-appeal input[type=image] {
margin: 20px;
}


@media screen and (max-width: 500px) {
#page-footer .bottom-menu li:last-child {
width: 100%;
Expand Down
59 changes: 42 additions & 17 deletions wikipendium/wiki/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,54 @@ <h1 class="float-left serif"><a class=header-logo-link href=/>
<div class=donation-appeal>
Wikipendium is ad-free and costs nothing to use.
Please help keep Wikipendium alive by donating today!

<form
action=https://www.paypal.com/cgi-bin/webscr
method=post
target=_top
>
<input
type=hidden
name=cmd
value=_s-xclick
/>
<input
type=hidden
name=encrypted
value="{{ PAYPAL_DONATION_PKCS7 }}"
/>
<input
type=image
src=https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif
border=0
name=submit
alt="PayPal - The safer, easier way to pay online!"
/>
<label>
<input
type=radio
name=amount
value="20.00"
/>
20 kr
</label>

<label>
<input
type=radio
name=amount
value="50.00"
checked
/>
<strong>50 kr</strong>
</label>

<label>
<input
type=radio
name=amount
value="100.00"
/>
100 kr
</label>

<input type=hidden name=cmd value=_donations>
<input type=hidden name=business value=[email protected]>
<input type=hidden name=item_name value="Wikipendium donation">
<input type=hidden name=currency_code value=NOK>
<div>
<input type=image
src=https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif
border=0
name=submit
alt="PayPal - The safer, easier way to pay online!"
/>
</div>
</form>

</div>
</div>
</footer>
Expand Down

0 comments on commit dd86da2

Please sign in to comment.