Changeset - efe90bd2d04e
[Not reviewed]
0 3 0
Bradley Kuhn (bkuhn) - 9 years ago 2015-03-09 15:46:16
bkuhn@ebb.org
Better animation effects when donate link clicked.

The banner always faded in/out, but now other texts can be designated
with the class 'donate-box-highlight' and those will fade out and fade
back in with bold and slightly larger font.
3 files changed with 17 insertions and 9 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/npoacct/index.html
Show inline comments
 
{% extends "base_conservancy.html" %}
 
{% load humanize %}
 

	
 
{% block subtitle %}NPOAcct - {% endblock %}
 
{% block category %}npoacct{% endblock %}
 

	
 
{% block head %}
 
<link href="/jquery-ui.css" rel="stylesheet" type="text/css"/>
 
<script type="text/javascript" src="/jquery.min.js"></script>
 
<script type="text/javascript" src="/jquery-ui.min.js"></script>
 
<script type="text/javascript" src="/supporter-page.js"></script>
 
{% endblock %}
 

	
 
{% block content %}
 

	
 
<div class="donate-sidebar">
 
<table style="background-color:#afe478;width:100%;">
 
<tr><td style="text-align:center;padding:10px;padding-bottom:10px;">
 

	
 
<div id="donate-box" class="toggle-unit"><h1 class="toggle-content">Donate Now!</h1></div>
 

	
 
<!--
 
<script type="text/javascript" src="https://js.balancedpayments.com/v1/balanced.js"></script>
 

	
 
<script type="text/javascript">
 
   // FOR DEMONSTRATION PURPOSES ONLY - if you already have a server you can POST to, replace
 
   //                                   the URL with the URL to post to.
 
   // go to http://requestb.in/
 
   // click create new request bin and COPY that URL without the ?inspect at the end
 
   var requestBinURL = 'http://requestb.in/1dk2x8y1';  // make sure it doesn't end in ?inspect
 

	
 
   var marketplaceUri = '/v1/marketplaces/TEST-MPMp7ZUPDpbj69vk2wGHRVY';
 
   //var marketplaceUri = 'https://www.balancedpayments.com/marketplaces/TEST-MPMp7ZUPDpbj69vk2wGHRVY';
 
   balanced.init(marketplaceUri);
 

	
 
var cardData = {
 
  "name": "Bernhard Riemann",                 // Optional
 
  "card_number": "4111 1111 1111 1111",
 
  "expiration_month": 4,
 
  "expiration_year": 2014,
 
};
 

	
 
function evbind(el, ev, handler) {
 
if(el.addEventListener) {
 
el.addEventListener(ev, handler, false);
 
} else if(el.attachEvent) {
 
el.attachEvent('on'+ev, function() {handler.apply(el);});
 
}
 
}
 

	
 
/*
 

	
 
   function responseCallbackHandler(response) {
 
      alert(response.status);
 
      switch (response.status) {
 
        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);
 
        }
 
    }
 
   //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>
 
-->
 
<h3>Support NPO Accounting Project Now!</h3>
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span> raised toward<br/>
 
our $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> goal.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 
<p style="font-size: 75%">(Progress bar updated daily.)</p>
 
<a id="donate" style="text-decoration:none"></a>
 
<h3>Help us reach our goal:</h3>
 
<h3 class="donate-box-highlight">Help us reach our goal:</h3>
 

	
 
<!-- PayPal start -->
 
<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="hosted_button_id" value="3VRTJALJ5PQRW">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" style="border:0" name="submit" alt="Donate Now!">
 
<img alt="" style="border:0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
</form>
 
<!-- PayPal end -->
 

	
 
<!-- Balanced start -
 
<div class="container">
 
- <form action="#" method="POST" id="bank-account-form" class="form-horizontal" onsubmit="balanced.card.create(cardData, function(response) { alert(response.status); });"> -
 
<form action="#" method="POST" id="bank-account-form" class="form-horizontal">
 
    <fieldset>
 
        <legend>Bank Account Information</legend>
 
        <p><label>Account Holder's Name
 
            <input type="text"
 
                   autocomplete="off"
 
                   placeholder="Bank Account Holder's name"
 
                   class="ba-name"
 
                   name="ba_name"
 
                   value="4111 1111 1111 1111">
 
        </label></p>
 
        <p><label>Routing Number
 
            <input type="text"
 
                   autocomplete="off"
 
                   placeholder="Routing Number"
 
                   class="ba-rn"
 
                   name="ba_rn"
 
                   value="4">
 
        </label></p>
 
        <p><label>Account Number
 
            <input type="text"
 
                   autocomplete="off"
 
                   placeholder="Account Number"
 
                   class="ba-an"
 
                   name="ba_an"
 
                   value="2014">
 
        </label></p>
 
        <p><label>Account Something
 
            <input type="text"
 
                   autocomplete="off"
 
                   placeholder="Account Something"
 
                   class="ba-as"
 
                   name="ba_as"
 
                   value="something someone">
 
        </label></p>
 
        <p><label>Account Type
 
            <select name="ba_type">
 
                <option value='' disabled selected style='display:none;'>
 
                    Select Account Type
 
                </option>
 
                <option value="checking" default>CHECKING</option>
 
                <option value="savings">SAVINGS</option>
 
            </select>
 
        </label></p>
 
        <button type="submit" class="btn">
 
            Tokenize
 
        </button>
 
    </fieldset>
 
</form>
 
</div>
 
<script type="text/javascript">
 

	
 
evbind(document.getElementById('bank-account-form'), 'submit',
 
  function(e) {
 
    e.preventDefault();
 
    console.log(this.ba_as.value);
 
    balanced.card.create(
 
 {
 
  "name": this.ba_as.value,
 
  "card_number": this.ba_name.value,
 
  "expiration_month": this.ba_rn.value,
 
  "expiration_year": this.ba_an.value,
 
/*
 
  "name": "Bernhard Riemann",                 // Optional
 
  "card_number": "4111 1111 1111 1111",
 
  "expiration_month": 4,
 
  "expiration_year": 2014,
 
*/
 
 },
 
    function(response) {
 
      console.log(response);
 
      console.log(response.data.uri);
 
      $.ajax("/campaign/?token=" + response.data.uri + '&amount=' + document.getElementById('bank-account-form').ba_an.value);
 
      alert(response.status);
 
    });
 
});
 

	
 
</script>
 
- Balanced end -->
 

	
 
<p>
 
Other donation methods:
 
  <span class="donate-box-highlight">Other donation methods:</span>
 
<div class="toggle-unit">
 
    <h4 class="toggle-control" data-text="Wire Transfer" 
 
    data-expanded-text="Wire Transfer:">Wire Transfer</h4>
 
    <div class="toggle-content">
 
        Please
 
            contact <a href="mailto:accounting@sfconservancy.org">Conservancy
 
            by email</a><br/> for wire transfer instructions.<br/>
 
            Please Include your currency and country.<br/>
 
    </div><!-- /.toggle-content -->
 
</div><!-- /.toggle.unit -->
 

	
 
<div class="toggle-unit">
 
    <h4 class="toggle-control" data-text="Paper Check" 
 
    data-expanded-text="Paper Check:">Paper Check</h4>
 
    <div class="toggle-content">
 
    Send paper check donations to:<br/>
 
    Software Freedom Conservancy, Inc.<br/>
 
    137 MONTAGUE ST  STE 380<br/>
 
    BROOKLYN, NY 11201-3548<br/>
 
    Please write <q>NPO ACCOUNTING</q> in the memo line. 
 
    </div><!-- /.toggle-content -->
 
</div><!-- /.toggle.unit -->
 

	
 
<!-- Flattr start -->
 
<p><a href="https://flattr.com/thing/1296704/NPOAcct-to-develop-Free-and-Open-Source-Non-Profit-Accounting-Software" target="_blank"><img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border:0" /></a></p>
 
<!-- Flattr end -->
 
</td></tr></table>
 
</div>
 

	
 
<div class="content-with-donate-sidebar">
 
<!-- begin campaign text -->
 

	
 
<h2>Fundraising Campaign: Non-Profit Accounting Software</h2>
 

	
 
<img src="/img/conservancy-accounting-campaign-logo.png" alt="Conservancy accounting campaign logo" style="float:left;" />
 

	
 
<blockquote>
 
<p><strong>Update on 2014-12-03:</strong> As can be seen, Conservancy sadly
 
  never reached our fundraising target for this project.  However, as we
 
  promised below, we <a href="http://npoacct.sfconservancy.org/">continue to
 
  work on this project</a>.  We'd really appreciate more donations, as we've
 
  needed to make a lot of compromises in our plans since we didn't reach our
 
  fundraising goal.  We did complete Phase 0 described below
 
  (<a href="http://npoacct.sfconservancy.org/">results are on our wiki</a>),
 
  and Phase 1 now comprises the development of an REST API for double-entry
 
  accounting  which many applications (including this one) can use.</p>
 
</blockquote>
 
<br/>
 
<hr/>
 
<p>Conservancy has a plan to help all non-profit organizations (NPOs) by
 
creating an Open Source and Free Software accounting system usable by
 
non-technical bookkeepers, accountants, and non-profit managers.  You can
 
help us do it by donating now.
 
</p>
 

	
 
<p>To keep their books and produce annual government filings, most NPOs rely
 
on proprietary software, paying exorbitant licensing fees.  This is
 
fundamentally at cross purposes with their underlying missions of charity,
 
equality, democracy, and sharing.</p>
 

	
 
<p>You can help Conservancy fix this problem by <a href="#donate-box" class="donate-now">donating now</a>.  We seek to
 
raise $75,000 to employ a 
 
developer for one year to make substantial progress on this project.</p>
 

	
 
<p>This project has the potential to save the non-profit sector
 
millions in licensing fees every year.  Even non-profits that continue to use proprietary accounting
 
software will benefit, since the existence of quality Open Source and Free
 
  Software for a particular task curtails predatory behavior by proprietary
 
  software companies, and creates a new standard of comparison.</p>
 

	
 
<p>But, more powerfully, this project's realization
 
will increase the agility and collaborative potential
 
for the non-profit sector &mdash; a boon to funders, boards, and employees &mdash;  bringing the Free Software and general NPO communities
 
into closer collaboration and understanding.</p>
 

	
 
<p>Thanks in advance for <a href="#donate-box" class="donate-now">helping us</a> develop Free Software to benefit all
 
non-profit organizations, and the 
 
populations they serve.</p>
 

	
 
<p>Donors of $500 or more will be acknowledged in the THANKS file and other
 
  appropriate places in the codebase itself.</p>
 

	
 
<p><a href="#endorsements">Endorsers of this effort</a> include April, Fractured Atlas, The Free Software
 
Foundation, Mozilla Foundation, GNOME Foundation, OpenHatch, Open
 
Source Initiative, QuestionCopyright.org, and Software in the Public
 
Interest; all encourage you to <a href="#donate-box" class="donate-now">donate and support it</a>.</p>
 

	
 

	
 
<h3>Background</h3>
 

	
 
<p>Like many non-profit organizations (NPOs) in the USA, Conservancy's
 
  financial accounts are audited annually by an independent accounting firm;
 
  we recently completed our fiscal year 2011 audit.  As usual, our auditors
 
  asked plenty of questions about our accounting software.  Conservancy uses
 
  only Free Software, of course, centered around a set of straightforward reporting
 
  scripts that we created to run on top
 
  of <a href="http://www.ledger-cli.org/">Ledger CLI</a>. (Conservancy's
 
  current configuration using Ledger CLI
 
  is <a href="https://gitorious.org/ledger/npo-ledger-cli">publicly
 
  documented and explained</a>.)</p>
 

	
 
<p>Our auditors were only familiar with proprietary accounting software, and
 
  so our system seemed foreign to them, as it relies on Ledger CLI's text files, Emacs and
 
  version control.  During their questions
 
  about our setup, we asked them to hypothetically prescribe a specific
 
  proprietary software setup as a model for  managing Conservancy's
 
  accounts.  Our chief auditor started by mentioning a few well-known
 
  proprietary solutions.   But then he paused and continued:  <q>Given
 
  that Conservancy's a fiscal sponsor with so many temporarily restricted
 
  accounts, existing systems really wouldn't do that good of a job for
 
  you</q>.</p>
 

	
 
<p>Indeed, Conservancy reached out into the broader fiscal sponsorship
 
  community beyond the <abbr title="Free, Libre and Open Source Software">FLOSS</abbr>
 
  <abbr title="Non-profit Organization">NPO</abbr> community and discovered that many larger fiscal sponsors &mdash; even
 
  those willing to use proprietary components &mdash; have cobbled together
 
  their own unique systems, idiosyncratically tailored to their specific
 
  environments.  Thus, good, well-designed, and reusable accounting software
 
  for non-profit fiscal sponsorship is not just missing in the software
 
  freedom community; it's missing altogether.</p>
 

	
 

	
 
<p>The project that Conservancy proposes will take a modest step
 
  forward in creating a better solution for everyone. 
 
  <a href="#quotes">Many NPO leaders and academics agree</a> with Conservancy about the
 
  immediate need for work to begin on this
 
  effort.  <a id="endorsements"
 
  style="text-decoration:none"></a><a href="http://april.org">April</a>, <a href="https://www.fracturedatlas.org">Fractured Atlas</a>, The <a href="http://fsf.org">Free Software
 
  Foundation</a>, The <a href="https://www.mozilla.org/foundation/">Mozilla
 
Foundation</a>, The <a href="http://www.gnome.org/foundation/">GNOME Foundation</a>,  <a
 
        href="https://openhatch.org/">OpenHatch</a>, <a href="http://opensource.org/node/658">Open Source Initiative</a>,
 
  <a href="http://QuestionCopyright.org">QuestionCopyright.org</a>, and <a href="http://www.spi-inc.org/">Software in the Public Interest</a> have
 
  all endorsed Conservancy's plan, and they encourage you to <a href="#donate-box" class="donate-now">donate and
 
  support it</a>.</p>
 

	
 
<p>Conservancy is uniquely qualified to undertake this task.  Using only Free
 
  Software, Conservancy already meets the complex accounting challenges of
 
  earmarked, directed donations for over thirty different projects.  We've
 
  learned much about this work in our first seven years of
 
  operation, and we're prepared to apply what we've learned to solve
 
  this problem not just for ourselves, but for anyone who seeks a
 
  solution that both respects software freedom and handles non-profit
 
  accounting for all sorts of NPOs, including fiscal sponsors.  General NPO
 
  accounting is just a &ldquo;base case&rdquo; of fiscal sponsorship (i.e.,
 
  an NPO is just a fiscal sponsor for one and only one specific project),
 
  and Conservancy therefore believes a solution that handles fiscal sponsors
 
  will also handle the simpler case as well.</p>
 

	
 
<h3>The Plan</h3>
 

	
 
<p>Conservancy proposes to hire a software developer for one year to
 
  accomplish the first two phases of this project.  Conservancy seeks to
 
  raise $75,000 toward this project to help cover salary and benefits for a
 
  full-time staffer to work on this project.  We ask that you give generously
 
  via the donation buttons on this page to support our work.</p>
 

	
 
<h4>Phase 0</h4>
 

	
 
<p>Some Free Software accounting systems do exist.  A previous informal
 
  survey of these systems that Conservancy conducted in 2007 led us to the
 
  conclusion that, in general, these systems were heavily geared toward
 
  for-profit endeavors, ignored the unique needs of NPOs generally, and
 
  were completely hopeless for the specific needs of a fiscal sponsoring
 
  organization.  Conservancy's assessment at the time was that these
 
  challenges could be addressed only with a large rewrite of one of these
 
  systems.  Conservancy chose
 
  <a href="http://www.ledger-cli.org/">Ledger CLI</a> precisely because
 
  it provided flexibility and configurability not present in any other Free Software
 
  double-entry accounting system.</p>
 

	
 
<p>However, while that previous informal survey informs Conservancy's
 
  existing hypothesis that Ledger CLI is the right base system here,
 
  Conservancy will first test that hypothesis.  The first phase of this
 
  project (estimated to last approximately 6-8 full-time weeks) will produce
 
  a written survey of all known Free Software accounting systems, and
 
  indicate what challenges exist to adapt such systems for the needs of
 
  NPOs.  The <a href="https://fsf.org/">Free Software Foundation</a> has
 
  pledged their help in the evaluation of SQL-Ledger,
 
  and <a href="http://www.gnome.org/foundation/">the GNOME Foundation</a> has pledged their
 
  help in the evaluation of <a href="http://www.gnucash.org/">GNUcash</a> (which they
 
  currently use, respectively).</p>
 

	
 
<h4>Phase 1</h4>
 

	
 
<p>Phase 1 of the project will select the preferred codebase from Phase 0,
 
  and improve that system to create a basic accounting system for
 
  small-to-medium sized USA NPOs (i.e., Form 990-filers) &mdash; including fiscal
 
  sponsors &mdash; with the following features:
 
<ul>
 
<li>Basic accounts payable/receivable (with invoicing)</li>
 
<li>Tracking and reporting of non-profit income types (related business
 
  income, unrelated business taxable income, donations, etc.)</li>
www/conservancy/static/supporter-page.js
Show inline comments
 
/* Copyright (C) 2012-2013 Denver Gingerich, 
 
** Copyright (C) 2013-2014 Bradley M. Kuhn.
 
** License: GPLv3-or-later
 
**  Find a copy of GPL at https://sfconservancy.org/GPLv3
 
*/
 

	
 
$(document).ready(function() {
 
    var goal  = $('span#fundraiser-goal').text();
 
    var soFar = $('span#fundraiser-so-far').text();
 
    var noCommaGoal = goal.replace(/,/g, "");
 
    var noCommaSoFar = soFar.replace(/,/g, "");
 
    var percentage = (parseFloat(noCommaSoFar) / parseFloat(noCommaGoal)) * 100;
 
    var curValue = 0.00;
 
    var incrementSoFar = 0.00;
 

	
 
    $('span#fundraiser-percentage').text("");
 
    $('span#fundraiser-percentage').css({ 'color'        : 'green',
 
                                          'font-weight'  : 'bold',
 
                                          'float'        : 'right',
 
                                          'margin-right' : '40%',
 
                                          'margin-top'   : '2.5%',
 
                                          'text-align'   : 'inherit'});
 
    $("#progressbar").progressbar({ value:  curValue });
 

	
 
    function slowRise() {
 
        if (curValue >= percentage) {
 
            $('span#fundraiser-so-far').text(soFar);
 
            $("#progressbar").progressbar({ value :  percentage });
 
            $('span#fundraiser-percentage').text(percentage.toFixed(1) + "%");
 
        } else {
 
            var newVal = (curValue / 100.00) * noCommaGoal;
 
            $("#progressbar").progressbar({ value:  curValue });
 
            $('span#fundraiser-so-far').text(newVal.toLocaleString());
 
            curValue += 0.5;
 
            setTimeout(slowRise, 50);
 
        }
 
    }
 
    slowRise();
 

	
 
    $('.toggle-content').hide();
 

	
 
    $('.toggle-control')
 
     .addClass('clickable')
 
     .bind('click', function() {
 
        var $control = $(this);
 
        var $parent = $control.parents('.toggle-unit');
 

	
 
        $parent.toggleClass('expanded');
 
        $parent.find('.toggle-content').slideToggle();
 

	
 
        // if control has HTML5 data attributes, use to update text
 
        if ($parent.hasClass('expanded')) {
 
            $control.html($control.attr('data-expanded-text'));
 
        } else {
 
            $control.html($control.attr('data-text'));
 
        }
 
    });
 
    $('a.donate-now')
 
      .addClass('clickable')
 
      .bind('click', function() {
 
        var $control = $('#donate-box');
 
        var $otherTextControl = $('.donate-sidebar');
 

	
 
        $control.toggleClass('expanded');
 
        $control.find('.toggle-content').slideUp("slow");
 
        $control.find('.toggle-content').slideDown("slow");
 
        setTimeout(function() { $control.find('.toggle-content').slideUp(100);
 
                                $control.toggleClass('expanded');
 
                                $control.find('.toggle-content').slideDown(800).fadeOut(10);
 
                                $otherTextControl.find('.donate-box-highlight').fadeOut(100);
 
                              }, 300);
 
          setTimeout(function() { $control.find('.toggle-content').fadeIn(2000);
 
                                  $otherTextControl.find('.donate-box-highlight')
 
                                  .css({'font-weight': 'bold', 'font-size' : '110%' });
 
                                  $otherTextControl.find('.donate-box-highlight').fadeIn(10000);
 
                                }, 500);
 
    });
 
    $(".t-shirt-size-selector").hide();
 
    $('input[name=on0]:radio').change(function() {
 
        var input=$(this);
 
        var tShirtSelector = input.parent().children('.t-shirt-size-selector')
 
        var noShippingSelector = input.parent().children('input#no_shipping');
 
        var value = input.val();
 
        if (value == "wantGiftYes") {
 
            tShirtSelector.show();
 
            noShippingSelector.val("2");
 
        } else {
 
            tShirtSelector.hide();
 
            noShippingSelector.val("0");
 
        }
 
    });
 

	
 
    // Forms start in "invalid" form, with the errors shown, so that
 
    // non-Javascript users see the errors by default and know what they must
 
    // enter.  The following two lines correct that.
 
    $('*#amount').addClass("valid");
 
    $('.supporter-form-inputs .form-error-show')
 
        .removeClass('form-error-show').addClass('form-error');
 
    $('.dinner-form-inputs .form-error-show')
 
        .removeClass('form-error-show').addClass('form-error');
 

	
 
    $('*#amount').on('input', function() {
 
        var input=$(this);
 
        var value = input.val();
 
        var errorElement=$("span#error", input.parent());
 
        var noCommaValue = value;
 
        noCommaValue = value.replace(/,/g, "");
 
        var re = /^((\d{1,3}(,?\d{3})*?(\.\d{0,2})?)|\d+(\.\d{0,2})?)$/;
 
        var isValid = ( re.test(value) &&
 
                        parseInt(noCommaValue) >= parseInt(input.attr("minimum")));
 
        if (isValid)  {
 
           input.removeClass("invalid").addClass("valid");
 
           errorElement.removeClass("form-error-show").addClass("form-error");
 
           $("#form-correction-needed").removeClass("form-error-show").addClass("form-error");
 
        }
 
        else {
 
            input.removeClass("valid").addClass("invalid");
 
            errorElement.removeClass("form-error").addClass("form-error-show");
 
        }
 
    });
 
    var validateFormAtSubmission = function(element, event) {
 
            var valid = element.hasClass("valid");
 
            if (! valid) {
 
                $("#form-correction-needed").removeClass("form-error").addClass("form-error-show")
 
                                        .css("font-weight", "bold").css("font-size", "150%");
 
	        event.preventDefault();
 
            } else {
 
                $("#form-correction-needed").removeClass("form-error-show").addClass("form-error");
 
            }
 
    };
 
    $(".supporter-form-submit#monthly").click(function (event) {
 
        validateFormAtSubmission($(".supporter-form#monthly input#amount"), event);
 
    });
 
    $(".supporter-form-submit#annual").click(function (event) {
 
        validateFormAtSubmission($(".supporter-form#annual input#amount"), event);
 
    });
 
    $(".dinner-form-submit").click(function (event) {
 
        validateFormAtSubmission($(".dinner-form input#amount"), event);
 
    });
 
    /* Handle toggling of annual/monthly form selections */
 
    $('.supporter-type-selection#monthly').hide();
 
    $('#annualSelector').css("font-weight", "bold").css("font-size", "127%");
 

	
 
    $("a[href$='monthly']").bind('click', function() {
 
        $('.supporter-type-selection#annual').hide();
 
        $('.supporter-type-selection#monthly').show();
 
        $('#monthlySelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#annualSelector').css("font-weight", "normal").css("font-size", "125%");
 
        $("#form-correction-needed").removeClass("form-error-show").addClass("form-error");
 
    });
 
    $("a[href$='annual']").bind('click', function() {
 
        $('.supporter-type-selection#annual').show();
 
        $('.supporter-type-selection#monthly').hide();
 
        $('#annualSelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#monthlySelector').css("font-weight", "normal").css("font-size", "125%");
 
    });
 
    $( ".footnote-mark" ).tooltip({
 
        items: "a",
 
        hide: { duration: 5000 },
 
        position: {
 
            my: "center bottom-20",
 
            at: "center left",
 
            using: function( position, feedback ) {
 
                $( this ).css( position );
 
                $( "<div>" )
 
                    .addClass( "arrow" )
 
                    .addClass( feedback.vertical )
 
                    .addClass( feedback.horizontal )
 
                    .appendTo( this );
 
            }
 
        },
 
        content: function() {
 
            return $('.footnote-1-text').text();
 
        }
 
    });
 
});
 

	
 
$(window).load(function () {
 
    verifySelctionCorrectOnPageLoad = function() {
 
        var ourURL = document.URL;
 
        if (ourURL.search("#monthly") > 0) {
 
            $('.supporter-type-selection#annual').hide();
 
            $('.supporter-type-selection#monthly').show();
 
            $('#monthlySelector').css("font-weight", "bold").css("font-size", "127%");
 
            $('#annualSelector').css("font-weight", "normal").css("font-size", "125%");
 
        }
 
        if (ourURL.search("#annual") > 0) {
 
            $('.supporter-type-selection#monthly').hide();
 
            $('.supporter-type-selection#annual').show();
 
            $('#annualSelector').css("font-weight", "bold").css("font-size", "127%");
 
            $('#monthlySelector').css("font-weight", "normal").css("font-size", "125%");
 
        }
 
    }
 
    if (location.hash) {
 
        setTimeout(verifySelctionCorrectOnPageLoad, 1);
 
    }
 
    window.addEventListener("hashchange", verifySelctionCorrectOnPageLoad);
 
});
www/conservancy/templates/base_compliance.html
Show inline comments
 
{% extends "base_conservancy.html" %}
 
{% load cache %}
 
{% load humanize %}
 
{% block head %}
 
<link href="/jquery-ui.css" rel="stylesheet" type="text/css"/>
 
<link href="/forms.css" rel="stylesheet" type="text/css"/>
 
<script type="text/javascript" src="/jquery.min.js"></script>
 
<script type="text/javascript" src="/jquery-ui.min.js"></script>
 
<script type="text/javascript" src="/supporter-page.js"></script>
 

	
 
{% endblock %}
 

	
 
{% block outercontent %}
 
<div class="donate-sidebar">
 
<table style="background-color:#afe478;width:100%;">
 
<tr><td style="text-align:center;padding:10px;padding-bottom:10px;">
 
<div id="donate-box" class="toggle-unit"><h1 class="toggle-content">Support
 
    Now!</h1></div>
 

	
 
<h3>Support GPL Compliance Now!</h3>
 

	
 
<p>Support our GPL compliance work now &amp; <strong>donations count double!</strong></p>
 
<p>Support our GPL compliance work now &amp; <span class="donate-box-highlight">donations count double!</span></p>
 

	
 
{% cache 3600 compliancedonation fundgoal.fundraiser_so_far_amount %}
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span>
 
of $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> match met.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 
{% endcache %}
 

	
 
<p>Donate now via PayPal:
 
<p><span class="donate-box-highlight">Donate now via PayPal:</span>
 
</p>
 
<!-- PayPal start -->
 
<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="hosted_button_id" value="4ZKJN4F9BMFAS">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" style="border:0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
<img alt="" style="border:0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
</form>
 
<!-- PayPal end -->
 

	
 
<p>Or, <a href="/supporter/#annual"><strong>become a Conservancy
 
      Supporter</strong></a> (&mdash; a better option if you're donating more
 
<p>Or, <a href="/supporter/#annual"><span class="donate-box-highlight">become a Conservancy
 
      Supporter</span></a> (&mdash; a better option if you're donating more
 
      than $120, since you'll get a t-shirt!).</p>
 
</td></tr></table>
 
</div>
 
<div class="content-with-donate-sidebar">
 
    <div id="container">
 
         <div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
 
            <h2>Our GPL {% block category %}Compliance{% endblock %} Work</h2>
 
            <ul>
 
            <li class="VMwareLawsuitAppeal"><a href="/linux-compliance/vmware-lawsuit-appeal.html">Stand Up For GPL!</a></li>
 
            <li><a href="/news/2015/mar/05/vmware-lawsuit/">VMware Lawsuit: Press Release</a></li>
 
            <li class="VMwareLawsuitFAQ"><a href="/linux-compliance/vmware-lawsuit-faq.html">
 
                <abbr title="Frequently Asked Questions">FAQ</abbr> on VMware Lawsuit</a></li>
 
            <li class="AboutCompliance"><a href="/linux-compliance/about.html">About GPL Compliance Project for Linux Developers</a></li>
 
            <li class="CopyleftOrg"><a href="https://copyleft.org/">copyleft.org</a></li>
 
            </ul>
 
         </div>
 
               <div id="mainContent">{% block content %}{% endblock %}
 
               </div>
 
</div></div>
 
{% endblock %}
0 comments (0 inline, 0 general)