Commit graph

175 commits

Author SHA1 Message Date
Bradley M. Kuhn
cfc4757938 Fix percentage, HT tmarble. 2014-12-09 09:08:56 -05:00
Bradley M. Kuhn
90a1bda3ea Additional sponsors overnight. 2014-12-09 07:22:55 -05:00
Bradley M. Kuhn
60d0a06e25 progressbar Javascript need not change for content
The content of the amounts for the fundraiser can be kept in the HTML
rather than the progress bar Javscript code.

I suspect at some point I should keep this data in the Django database
and extract it from there as dynamic content.
2014-12-08 19:15:17 -05:00
Bradley M. Kuhn
bbbface83a Two people joined with match. 2014-12-08 19:07:29 -05:00
Bradley M. Kuhn
c2c7b9b638 Even more shortening of donate box text. 2014-12-08 18:37:35 -05:00
Bradley M. Kuhn
fa6bf388f9 Shorten text even more. 2014-12-08 18:26:32 -05:00
Bradley M. Kuhn
a92fc7bb4d Shorten text in bar so it scrolls better.
The text in the bar was a bit too much, it did not scroll well.  I've
shortened the text to fix the problem.
2014-12-08 18:24:32 -05:00
Bradley M. Kuhn
af5d12f7a1 Rework CSS for "Big News" & add image.
This image now is displayed with the same background and to the left of
the "Big News".  I spent extensive time researching how best to present
a larger <div> with the grey background and have the image properly
scale beside it.  Ultimately, I couldn't find a better way than this,
and this is hardly optimal.

For example, I looked into wrapping the whole thing in a div, with two
div's inside, and applying various CSS to each to get the image to
properly stay right next to the text and scale in size when resizing of
media made paragraph longer.  This generated even more problems, so I
went with the simpler solution herein, which probably isn't correct and
may well do odd things on different types of media.
2014-12-08 17:14:52 -05:00
Bradley M. Kuhn
8e22371f19 Progress bar & $5k triple-match program.
An anonymous donor is matching up to $5k at 2-to-1 for supporter
donations.  Therefore, update the page to include a progress bar for
this, and add notes about it in various places.
2014-12-08 15:45:58 -05:00
Bradley M. Kuhn
674261e0f0 Start errors in shown state for non-Javascript.
Since the error messages have important information, and since the
Javascript code is the only "enforcer" of the minimum donation, the
errors really should be displayed by default if the browser is not
Javascript-capable.  This change does that, but also toggles the state
back so that errors are not shown until needed in Javascript-capable
browsers.

I believe this still fits graceful degradation, since browsers without
Javascript and CSS were already showing the errors anyway, so now the
only real change is that everyone sees the errors by default.

It *might* make sense to not show the errors in red in non-Javascript
browsers (i.e., make the default CSS color black for the form-error-show
class, and then change it to red in the Javascript).  I didn't make that
so, because it's not clear to me that's right, and we *do* want to draw
attention to the errors lest people become a supporter below the
minimum (which has happened once already -- that precipitated this
change).

I'm still annoyed that PayPal doesn't provide a "minimum but no maximum"
variable donation box of its own, which would solve this problem
outright.
2014-12-05 10:07:27 -05:00
Bradley M. Kuhn
0b57b1162d This should really be a class, not an id. 2014-12-05 09:48:04 -05:00
Martin Michlmayr
6a55036282 Fix some HTML syntax errors 2014-12-04 10:49:39 -05:00
Bradley M. Kuhn
9c40bf2e60 supporter-form & support-form-submit: class,not id
These should be classes, not ids, and the ids should identify whether
it's the monthly or the annual form.
2014-12-03 20:43:28 -05:00
Bradley M. Kuhn
8c3ecd347a Return amount to id; add id for error span.
I actually think I want amount to be id rather than a class, now that I
figured out the proper selector to find them all.

Also, the $("span", input.parent()) was buggy if there were any other
span's other than error-related ones in the supporter-form-inputs div.

Finally, ditch that <small> stuff and simply place a font-size reduction
into the CSS for the form-error-show.
2014-12-03 20:42:33 -05:00
Bradley M. Kuhn
6b9bdb335e Modify PayPal "no_shipping" var via t-shirt choice
According to
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

  no_shipping has the following values:
      0: prompt for an address, but do not require one
      1: do not prompt for an address
      2: prompt for an address, and require one
      The default is 0.

Ideally, any time they change wantGift, even in a pure HTML form, we'd
change it between 0 and 2 as appropriate (i.e., we need the address if
they want the t-shirt).

However, I couldn't find an easy way to make this modification in pure
CSS or HTML, so it only happens in Javascript-enabled browsers.

This is still graceful degradation, since the only impact is in cases
where a non-Javascript user fails to give us an address, and we have to
email later to get the shipping address.
2014-12-03 18:50:53 -05:00
Bradley M. Kuhn
e0f0ee820f Monthly supporter can enter variable amount.
This required some doing.  I'm not completely sure it works, but I
roughly followed the tutorial available at:
  https://www.paypal.com/webapps/mpp/get-started/create-recurring-donation-button
with back-reference to this:
  https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

My main concern with this setup currently is that 'p3' must be set to
'1', which would seem from the documentation to be saying the payment
will recur only once.  There is a subtle hint via the tutorial that
setting 'src' to 1 will override 'p3' with whatever is found in 'srt',
but that's not said anywhere explicitly that I can find.  So, I'm going
with this and I'll just test it myself with a monthly subscription to
see if it's indefinite (which is the behavior we herein desire).

Finally, note that "amount" is now a class rather than id, since I'm now
using the associated jQuery .on('input') code for both the annual and
monthly amount boxes.
2014-12-03 18:10:45 -05:00
Bradley M. Kuhn
58f45a556b Typo fix. (HT: pehjota) 2014-12-03 17:44:38 -05:00
Bradley M. Kuhn
eea08767d3 Change default to "no t-shirt".
I suspect some supporters are just accepting the default, so by default,
the t-shirt option will be "No", and supporters will have to
affirmatively chose "Yes".

Thanks to previously committed Javascript hack, users with Javascript
capable browsers should avoid seeing the t-shirt sizing options until
they chose "Yes".
2014-12-03 16:20:57 -05:00
Bradley M. Kuhn
7fec31ce8a Hide t-shirt size selector when t-shirt's unwanted
Use Javascript to hide the t-shirt size selector when the the user
selects "No" for "Do you want a t-shirt?".  Reshow it (and make sure
it's shown by default) for "Yes".
2014-12-03 13:33:26 -05:00
Bradley M. Kuhn
e926570ec5 Link to the public list. 2014-12-03 12:34:53 -05:00
Bradley M. Kuhn
8ce79c7efd Put hr tag inside this div to inherit properties. 2014-12-03 09:58:52 -05:00
Bradley M. Kuhn
5014455930 Remove http://sfconservancy.org; this is that site 2014-12-03 08:46:58 -05:00
Bradley M. Kuhn
c24285c461 Links to project websites. 2014-12-03 08:45:01 -05:00
Bradley M. Kuhn
81a73acec4 Shorten text. 2014-12-02 20:57:46 -05:00
Bradley M. Kuhn
ee7125fd31 Full name of this project, and a link. 2014-12-02 18:31:13 -05:00
Bradley M. Kuhn
8291c3db2e Reword text again. 2014-12-02 18:29:06 -05:00
Bradley M. Kuhn
b6b94e3206 Clarify no benefits received until 12 months. 2014-12-02 18:27:22 -05:00
Bradley M. Kuhn
44301d386b Correct Markdown-style footnote w/ HTML style one.
This footnote is now correctly formatted in HTML, with links back and
forth, as well as a jQuery UI tooltip popup for the footnote.
2014-12-02 18:25:42 -05:00
Bradley M. Kuhn
dbe8d4f238 Remove hard-coded style= for donate-sidebar div
Move the CSS for the donate-sidebar into the conservancy.css file
instead of hard-coding in the HTML.
2014-12-02 17:51:10 -05:00
Bradley M. Kuhn
3dd381cddb Make error text even shorter. 2014-12-02 17:35:31 -05:00
Bradley M. Kuhn
8fbf7ba2b0 Reword text. 2014-12-02 17:34:08 -05:00
Bradley M. Kuhn
0d0f7707e9 This must be below the second div. 2014-12-02 17:32:39 -05:00
Bradley M. Kuhn
090fb9f268 Larger error message when submitting bad amount.
This addition to the Javascript and text ensures a clear message to the
user of a Javascript-enabled browser that there is an issue with the
amount.  Also, it prevents submission of the form until the amount is
correct.

A user with Javascript disabled can circumvent these validation steps;
however, the worst-case scenario is that they make a donation for less
than $120 that is categorized in Conservancy's internal system as a
Supporter donation, and we'll be adding internal checks to find that.
2014-12-02 17:26:55 -05:00
Bradley M. Kuhn
403c884489 Add alt text. 2014-12-02 16:21:16 -05:00
Bradley M. Kuhn
6e3468bc98 Modify CSS, image & related so img of heart works.
Putting the heart on the floated right corner should work pretty well
now with this CSS.
2014-12-02 16:20:10 -05:00
Bradley M. Kuhn
870d25d9e3 Force scaling of width for banner.
The banner should scale with the width of the window.
2014-12-02 16:11:36 -05:00
Bradley M. Kuhn
aa0f8b1c74 Apparently, we aren't using this now.
<tony> bkuhn, karen:  so, let's not bother using the logo-heart. The pic adds
       enough visual interest.  Now, what about the the text header.  Do you
       want it to be a smidgen smaller?
2014-12-02 15:57:49 -05:00
Bradley M. Kuhn
d78052f25e Correct img tag. 2014-12-02 15:41:54 -05:00
Bradley M. Kuhn
fca6ed8229 Conservancy Supporter headers & their placement. 2014-12-02 15:40:46 -05:00
Bradley M. Kuhn
8c653e884f URL changes for successful supporter redirection. 2014-12-02 15:31:07 -05:00
Bradley M. Kuhn
667118755c Thank-you page to redirect supporters post-payment
This page is now set as part of the PayPal giving forms to redirect
supporters to after they've paid.
2014-12-02 15:30:02 -05:00
Bradley M. Kuhn
8bfe2e16f4 Add image from Karen of t-shirt. 2014-12-02 14:08:26 -05:00
Bradley M. Kuhn
fa29e1b8f3 Customized buttons for annual/monthly supporter.
These buttons were drawn by Tony and replace the default PayPal buttons.
2014-12-02 13:41:04 -05:00
Bradley M. Kuhn
b90413809f Subscriptions for monthly supporters.
There are now two options at the bottom of the page, annual and monthly
supporters.

In addition, there is Javascript code to cause the annual and monthly
items disappear and reappear upon selection either in the donate box or
the selector above the items.

I tested this in links and it seems to degrade reasonably well.
2014-12-02 13:35:53 -05:00
Bradley M. Kuhn
15b3cbb273 Better alt text and incorrectly placed </div> 2014-12-02 12:11:36 -05:00
Bradley M. Kuhn
194f95d016 Float Donate button to the center beside questions
The donate button is now centered beside the questions that relate to
the supporter program.
2014-12-02 12:09:43 -05:00
Bradley M. Kuhn
4003c1b8c9 Better formatting for submit button.
The needed CSS is already in forms.css
2014-12-02 12:00:18 -05:00
Bradley M. Kuhn
6aff0260a0 Correct various HTML formatting issues. 2014-12-02 11:57:42 -05:00
Bradley M. Kuhn
83dd8a3fbd Remove stray end tag. 2014-12-02 11:55:06 -05:00
Bradley M. Kuhn
6d365d77ed Make this text a bit shorter. 2014-12-02 11:53:49 -05:00
Bradley M. Kuhn
9bfb5e10de Rework form with error messages & basic validation
Since PayPal cannot seem to be cajoled into verifying a minimum amount,
we have to do it here with Javascript.  This isn't perfect validation:
the form can currently still be submitted with an amount less than $120,
but at least this way Javascript-enabled browsers might prevent some
folks from doing that.
2014-12-02 11:31:43 -05:00
Bradley M. Kuhn
01eb8c80c8 Move javascript code from HTML files to a .js file 2014-12-02 11:28:37 -05:00
Bradley M. Kuhn
449a6c6749 Change form type to make $120 auto work. 2014-12-01 20:19:43 -05:00
Bradley M. Kuhn
a542a92937 Does this work better without _s thing? 2014-12-01 19:06:32 -05:00
Bradley M. Kuhn
76479769d4 Attempt to fix amount not coming through. 2014-12-01 18:45:29 -05:00
Bradley M. Kuhn
ea23feebfa Shorten lines. 2014-12-01 18:35:31 -05:00
Bradley M. Kuhn
aa7321a34d os3 not coming through to PayPal;Will this fix it? 2014-12-01 18:33:50 -05:00
Bradley M. Kuhn
ba612c1ed6 Remove thank-you URL for now. 2014-12-01 13:57:01 -05:00
Bradley M. Kuhn
92be0bbb90 Remove ! from this sentence, per karen:
<karen> I would take the exclamation point off of "Support us via PayPal or
        credit card!"  [13:55]
2014-12-01 13:55:19 -05:00
Bradley M. Kuhn
432c868ae5 Change ids. 2014-12-01 13:51:42 -05:00
Bradley M. Kuhn
c5830136f9 Add Become a supporter. 2014-12-01 13:50:12 -05:00
Bradley M. Kuhn
a3516ffa60 Fix Donate now. 2014-12-01 13:48:55 -05:00
Bradley M. Kuhn
4ddb1051c8 Fix anchor failed close with > 2014-12-01 13:47:27 -05:00
Bradley M. Kuhn
6053651442 Various fixes for amount box. 2014-12-01 13:46:55 -05:00
Bradley M. Kuhn
ce87be9291 More links to donate-box flash. 2014-12-01 13:44:54 -05:00
Bradley M. Kuhn
aec0f8080e Rework text on form. 2014-12-01 13:44:47 -05:00
Bradley M. Kuhn
47345eae95 Add link to donate box. 2014-12-01 13:43:43 -05:00
Bradley M. Kuhn
47ebde2bdc Fix anchor. 2014-12-01 13:41:38 -05:00
Bradley M. Kuhn
1d2cabdde8 Add heading. 2014-12-01 13:41:34 -05:00
Bradley M. Kuhn
873ced992a Move donate link to bottom; link to from sidebar. 2014-12-01 13:38:17 -05:00
Bradley M. Kuhn
00b0576bbb Add show/hide javascript as used for npoacct. 2014-12-01 13:38:08 -05:00
Bradley M. Kuhn
7276f0e17c Fix various problems with amount box. 2014-12-01 13:29:42 -05:00
Bradley M. Kuhn
448f1b02ef Rework form to make it fit better. 2014-12-01 13:25:25 -05:00
Bradley M. Kuhn
694e773ee5 Add Django templating and donation box. 2014-12-01 13:11:36 -05:00
Bradley M. Kuhn
ae1bbf964b Initial draft of supporter page. 2014-12-01 13:02:02 -05:00