Create renewal option on form.

This adds a renewal option to the form.
This commit is contained in:
Bradley M. Kuhn 2015-12-21 09:25:04 -08:00
parent a492430379
commit f1c924b07e
2 changed files with 86 additions and 3 deletions

View file

@ -181,6 +181,9 @@ $(document).ready(function() {
$(".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);
});
@ -190,17 +193,29 @@ $(document).ready(function() {
$("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 },
@ -230,12 +245,22 @@ $(window).load(function () {
$('.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) {

View file

@ -17,6 +17,7 @@
<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>
@ -39,7 +40,8 @@
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 -->
@ -244,7 +246,7 @@ so we can stand up for the GPL together.</p>
<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>
@ -362,6 +364,62 @@ so we can stand up for the GPL together.</p>
</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 %}