The default amount of $120 appears in the amount field, but the class
"valid" was usually only added when the user changes the amount.
The valid class must be added at the start to ensure someone simply
clicking with the default still can donate.
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.
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.
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.