File diff 6e49d079dae5 → 667a54e04559
www/conservancy/static/campaign/index.html
Show inline comments
...
 
@@ -80,90 +80,90 @@ el.attachEvent('on'+ev, function() {handler.apply(el);});
 
        case 400:
 
            // missing or invalid field - check response.error for details
 
            console.log(response.error);
 
            break;
 
        case 404:
 
            // your marketplace URI is incorrect
 
            console.log(response.error);
 
            break;
 
        case 201:
 
            // WOO HOO! MONEY!
 
            // response.data.uri == URI of the bank account resource you
 
            // should store this bank account URI to later credit it
 
            console.log(response.data);
 
            var $form = $("#bank-account-form");
 
            // the uri is an opaque token referencing the tokenized bank account
 
            var bank_account_uri = response.data['uri'];
 
            // append the token as a hidden field to submit to the server
 
            $('<input>').attr({
 
               type: 'hidden',
 
               value: bank_account_uri,
 
               name: 'balancedBankAccountURI'
 
            }).appendTo($form);
 
            $form.attr({action: requestBinURL});
 
            $form.get(0).submit();
 
		break;
 
	default:
 
		console.log(response.status);
 
        break;
 
    default:
 
        console.log(response.status);
 
        }
 
    }
 
   //alert('allo?');
 

	
 
   var tokenizeInstrument = function(e) {
 
        alert('what"s going on?');
 
        e.preventDefault();
 
   
 
        var $form = $('#bank-account-form');
 
        var bankAccountData = {
 
            name: $form.find('.ba-name').val(),
 
            account_number: $form.find('.ba-an').val(),
 
            bank_code: $form.find('.ba-rn').val(),
 
            type: $form.find('select').val()
 
        };
 
 
 
 
 
        balanced.bankAccount.create(bankAccountData, responseCallbackHandler);
 
    };
 
   $('#bank-account-form').submit(tokenizeInstrument);
 
*/
 
</script>
 
-->
 
<p>$2,515 raised toward<br/>
 
our $75,000 goal.</p>
 
<div id="progressbar" style="height:20px;"></div>
 
<p><font style="font-size: 25%">(Progress bar updated daily.)</font></p>
 
<p>Help us reach our goal:</p>
 

	
 
<!-- Google Checkout start -->
 
<script type="text/javascript"> 
 
function validateAmount(amount){
 
	if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
 
		return true;
 
	}else{
 
		alert('You must enter a valid donation.');
 
		amount.focus();
 
		return false;
 
	}
 
    if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
 
        return true;
 
    }else{
 
        alert('You must enter a valid donation.');
 
        amount.focus();
 
        return false;
 
    }
 
}
 
</script>
 
<form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
 
    <input name="item_name_1" type="hidden" value="Directed Donation for Conservancy's NPO accounting software project"/>
 
    <input name="item_description_1" type="hidden" value="This donation to the Software Freedom Conservancy, Inc. is directed toward Conservancy's NPO accounting software project.  Conservancy is a 501(c)(3) charity in New York."/>
 
    <input name="item_quantity_1" type="hidden" value="1"/>
 
    <input name="item_currency_1" type="hidden" value="USD"/>
 
    <input name="item_is_modifiable_1" type="hidden" value="true"/>
 
    <input name="item_min_price_1" type="hidden" value="6.0"/>
 
    <input name="item_max_price_1" type="hidden" value="25000.0"/>
 
    <input name="_charset_" type="hidden" value="utf-8"/>
 
    <table cellpadding="5" cellspacing="0" width="1%">
 
        <tr>
 
            <td align="right" valign="top" style="padding-top:9px;" nowrap="nowrap" width="1%">&#x24; <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="6" type="text" value="250.00"/>
 
            </td>
 
            <td align="left" width="1%">
 
                <input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&amp;w=115&amp;h=50&amp;style=trans&amp;variant=text&amp;loc=en_US" type="image"/>
 
            </td>
 
        </tr>
 
    </table>
 
</form>
 
<!-- Google Checkout end -->
 

	
 
<!-- PayPal start -->