Changeset - f1c924b07e91
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 8 years ago 2015-12-21 17:25:04
bkuhn@ebb.org
Create renewal option on form.

This adds a renewal option to the form.
2 files changed with 86 insertions and 3 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -160,86 +160,111 @@ $(document).ready(function() {
 
           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);
 
    });
 
    $(".supporter-form-submit#renewal").click(function (event) {
 
        validateFormAtSubmission($(".supporter-form#renewal 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#renewal').hide();
 
        $('.supporter-type-selection#monthly').show();
 
        $('#monthlySelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#annualSelector').css("font-weight", "normal").css("font-size", "125%");
 
        $('#renewalSelector').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#renewal').hide();
 
        $('.supporter-type-selection#monthly').hide();
 
        $('.supporter-type-selection#annual').show();
 
        $('#annualSelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#renewalSelector').css("font-weight", "normal").css("font-size", "125%");
 
        $('#monthlySelector').css("font-weight", "normal").css("font-size", "125%");
 
    });
 
    $("a[href$='renewal']").bind('click', function() {
 
        $('.supporter-type-selection#annual').hide();
 
        $('.supporter-type-selection#monthly').hide();
 
        $('.supporter-type-selection#renewal').show();
 
        $('#renewalSelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#monthlySelector').css("font-weight", "normal").css("font-size", "125%");
 
        $('#annualSelector').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%");
 
            $('#renewalSelector').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%");
 
            $('#renewalSelector').css("font-weight", "normal").css("font-size", "125%");
 
        }
 
        if (ourURL.search("#renewal") > 0) {
 
            $('.supporter-type-selection#monthly').hide();
 
            $('.supporter-type-selection#annual').hide();
 
            $('.supporter-type-selection#renewal').show();
 
            $('#renewalSelector').css("font-weight", "bold").css("font-size", "127%");
 
            $('#monthlySelector').css("font-weight", "normal").css("font-size", "125%");
 
            $('#annualSelector').css("font-weight", "normal").css("font-size", "125%");
 
        }
 
    }
 
    if (location.hash) {
 
        setTimeout(verifySelctionCorrectOnPageLoad, 1);
 
    }
 
    window.addEventListener("hashchange", verifySelctionCorrectOnPageLoad);
 
});
www/conservancy/static/supporter/2015-supporter-appeal.html
Show inline comments
 
{% extends "base_conservancy.html" %}
 
{% block subtitle %}Support Conservancy - {% endblock %}
 
{% block category %}supporter{% endblock %}
 

	
 
{% block head %}
 
<link href="/css/forms.css" rel="stylesheet" type="text/css"/>
 
{% 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">Support
 
    Now!</h1></div>
 

	
 
<h3 class="donate-box-highlight">Become a Supporter Now:</h3>
 

	
 
<p>Support us now!</p>
 

	
 
<h4><a href="#renewal"><span class="donate-box-highlight">Renewing Annual supporter</span> via PayPal, ACH, or credit card.</a></h4>
 
<h4><a href="#annual"><span class="donate-box-highlight">Annual supporter</span> via PayPal, ACH, or credit card.</a></h4>
 
<h4><a href="#monthly"><span class="donate-box-highlight">Monthly supporter</span> via PayPal, ACH, or credit card.</a></h4>
 
   
 
<span class="donate-box-highlight">Other annual supporters 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">
 
       Contact <a href="mailto:accounting@sfconservancy.org">Conservancy
 
            by email</a><br/> for wire transfer instructions.<br/>
 
            Include  currency &amp; 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 for $120 to:<br/>
 
    Software Freedom Conservancy, Inc.<br/>
 
    137 MONTAGUE ST  STE 380<br/>
 
    BROOKLYN, NY 11201-3548 &nbsp; USA<br/>
 
    Please write <q>SUPPORTER</q> and t-shirt size in memo line. 
 
    Please write <q>SUPPORTER</q>, t-shirt size, if you are renewing, and if
 
    you want public acknowledgment in memo line. 
 
    </div><!-- /.toggle-content -->
 
</div><!-- /.toggle.unit -->
 

	
 
<p><a href="/donate">Even More Ways to Donate</a></p>
 
<!-- Flattr end -->
 
</td></tr></table>
 
</div>
 
<div class="content-with-donate-sidebar">
 
  <h1 class="appeal"><img class="appeal-header" alt="Become a Conservancy Supporter!" src="/img/conservancy-supporter-header.png"/></h1>
 
<h4>Software Freedom needs your help. </h4>
 

	
 
<p><em>Conservancy must move to a 
 
Supporter-driven organization so we can focus on critical free software 
 
issues that nobody else is tackling.  Stand up for the GPL, support great 
 
member projects, and make your voice heard in support of free software.  
 
<a href="#donate-box" class="donate-now">Donate today!</a></em></p>
 

	
 
<!--- FIXME scale this properly like on VMware page -->
 

	
 
<a href="/img/member-project-logos.png"><img class="appeal-left" src="/img/member-project-logos.png"/></a>
 
<p>
 

	
 
The world today is powered increasingly by Free Software. But what many
 
people don't realize is how much support is needed to keep all of these
...
 
@@ -223,49 +225,49 @@ help companies become free and open source software users and contributors.
 
<p>Moreover, we have lost committed general funding from companies explicitly
 
because of our enforcement work. Continuing this work without individual
 
support is no longer possible.</p>
 

	
 
<p>As a result, we need 2,500 Supporters in order to maintain the staff and
 
resources in the organization to properly undertake enforcement. We hope you
 
will <a href="#donate-box" class="donate-now">sign up as a Supporter</a>
 
to help us achieve this. If we don't reach our goal, we will have no choice
 
but to hibernate enforcement until we have the resources to pick it up
 
properly at some point in the future.</p>
 

	
 
<p>If you care about the
 
GPL, <a href="#donate-box" class="donate-now">help us meet our goal</a>
 
so we can stand up for the GPL together.</p>
 

	
 
<img class="appeal-footer" alt="*" src="/img/conservancy-supporter-heart.png"/>
 

	
 

	
 
<p>Please <a href="#donate-box" class="donate-now">join our Supporter program</a> and spread software freedom!</p>
 

	
 
<br clear="left"/>
 

	
 
<div class="supporter-type-selector">
 
<hr/>
 
  <strong>Become a Supporter Now:</strong>  <a id="annualSelector" href="#annual">Annual</a> | <a id="monthlySelector" href="#monthly">Monthly</a></div>
 
  <strong>Become a Supporter Now:</strong>   <a id="annualSelector" href="#annual">Annual</a> | <a id="monthlySelector" href="#monthly">Monthly</a> | <a id="renewalSelector" href="#renewal">Annual Renew</a></div>
 
<div id="annual" class="supporter-type-selection">
 
<h3>Join as an Annual Supporter</h3>
 
<a id="annual"></a>
 
<form id="annual" class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="supporter">
 
<div class="supporter-form-inputs">
 
            <input type="hidden" name="return" value="https://sfconservancy.org/supporter/thank-you.html" />
 
            <input type="hidden" name="cmd" value="_xclick" />
 
            <input type="hidden" name="business" value="supporter@sfconservancy.org" />
 
            <input type="hidden" name="item_name" value="Conservancy Supporter, Annual" />
 
            <input id="no_shipping" type="hidden" name="no_shipping" value="0" />
 
  <label for="amount"><strong>Amount:</strong> $</label>
 
  <input id="amount" type="text" name="amount" size="7" minimum="120" value="120" />
 
  <span id="error" class="form-error-show">$120 is a minimum for Conservancy
 
  Supporters.  <a href="/donate">Donate smaller amounts here</a>.</span><br/>
 

	
 
                      <label for="wantGift"><strong>Do you want to receive a t-shirt? </strong></label>
 
                      <input type="radio" name="on0" value="wantGiftYes" />Yes
 
                      <input type="radio" checked="checked" name="on0" value="wantGiftNo" />No
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="tShirtSize"><strong>T-shirt size: </strong></label>
 
                      <select name="os0" id="os0">
 
                        <option name="os0" id="os0" value="MenS">Men's S</option>
 
                        <option name="os0" id="os0" value="MenM">Men's M</option>
...
 
@@ -341,27 +343,83 @@ so we can stand up for the GPL together.</p>
 
                        <option name="os0" id="os0" value="LadiesM">Ladies' M</option>
 
                        <option name="os0" id="os0" value="LadiesL">Ladies' L</option>
 
                         <option name="os0" id="os0" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
 
                          Should we  <a href="/sponsors#supporters">list you publicly</a> as a Conservancy Supporter? </strong></label>
 
                      <input type="radio" checked="checked" name="on1" value="publicAckYes" />Yes
 
                      <input type="radio" name="on1" value="publicAckNo" />No<br/>
 
                      <label for="joinList"><strong>Join Conservancy's
 
                      Low-Traffic Announcement Email List? </strong></label>
 
                      <input type="radio" checked="checked" name="os1" value="joinListYes" />Yes
 
                      <input type="radio" name="os1" value="joinListNo" />No<br/>
 
                      <br /></div>
 
                      <div id="monthly" class="supporter-form-submit">
 
                      <input type="image"
 
                      src="/img/supporter-payment-button-monthly.png"
 
                      height="81" width="188"
 
                      border="0" name="submit" alt="Become a Monthly Supporter Now!">
 
<br/><br/><small>Button above redirects to PayPal's site for credit
 
        card, bank account or PayPal balance payment methods.  Select
 
                      options first.</small>
 
                      </div>
 
</form>
 
</div>
 
<div id="renewal" class="supporter-type-selection">
 
<h3>Renew as an Annual Supporter</h3>
 
<a id="renewal"></a>
 
<form id="renewal" class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="supporter">
 
<div class="supporter-form-inputs">
 
            <input type="hidden" name="return" value="https://sfconservancy.org/supporter/thank-you.html" />
 
            <input type="hidden" name="cmd" value="_xclick" />
 
            <input type="hidden" name="business" value="supporter@sfconservancy.org" />
 
            <input type="hidden" name="item_name" value="Conservancy Supporter, Annual Renewal" />
 
            <input id="no_shipping" type="hidden" name="no_shipping" value="0" />
 
  <label for="amount"><strong>Amount:</strong> $</label>
 
  <input id="amount" type="text" name="amount" size="7" minimum="120" value="120" />
 
  <span id="error" class="form-error-show">$120 is a minimum for Conservancy
 
  Supporters.  <a href="/donate">Donate smaller amounts here</a>.</span><br/>
 

	
 
                      <label for="wantGift"><strong>Do you want to receive (another) t-shirt? </strong></label>
 
                      <input type="radio" name="on0" value="wantGiftYes" />Yes
 
                      <input type="radio" checked="checked" name="on0" value="wantGiftNo" />No
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="tShirtSize"><strong>T-shirt size: </strong></label>
 
                      <select name="os0" id="os0">
 
                        <option name="os0" id="os0" value="MenS">Men's S</option>
 
                        <option name="os0" id="os0" value="MenM">Men's M</option>
 
                        <option name="os0" id="os0" value="MenL">Men's L</option>
 
                        <option name="os0" id="os0" value="MenXL">Men's XL</option>
 
                        <option name="os0" id="os0" value="Men2XL">Men's 2XL</option>
 
                        <option name="os0" id="os0" value="LadiesS">Ladies' S</option>
 
                        <option name="os0" id="os0" value="LadiesM">Ladies' M</option>
 
                        <option name="os0" id="os0" value="LadiesL">Ladies' L</option>
 
                         <option name="os0" id="os0" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
 
                          Should we <a href="/sponsors#supporters">list you publicly</a> as a Conservancy Supporter? </strong></label>
 
                      <input type="radio" checked="checked" name="on1" value="publicAckYes" />Yes
 
                      <input type="radio" name="on1" value="publicAckNo" />No<br/>
 
            
 
                      <label for="joinList"><strong>Join Conservancy's
 
                      Low-Traffic Announcement Email List? </strong></label>
 
                      <input type="radio" checked="checked" name="os1" value="joinListYes" />Yes
 
                      <input type="radio" name="os1" value="joinListNo" />No<br/>
 
                      <br />
 
                      <br /></div>
 
                      <div id="renewal" class="supporter-form-submit">
 
                      <input type="image"
 
                             src="/img/supporter-payment-button-annual.png"
 
                             height="81" width="188"
 
                             border="0" name="submit" alt="Renew as an Annual Supporter Now!">
 
                      <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
<br/><br/><small>Button above redirects to PayPal's site for credit
 
        card, bank account or PayPal balance payment methods.  Select options
 
        first.  Choosing options here will change any previous settings.</small>
 
                      </div>
 

	
 
</form>
 
</div>
 
<span id="form-correction-needed" class="form-error">Please ensure all form data above is correct.</span>
 
</div>
 
{% endblock %}
0 comments (0 inline, 0 general)