supporter: Fix redundant annual/monthly/renewal ids.
This commit is contained in:
parent
dad41f4817
commit
78c474caac
2 changed files with 12 additions and 18 deletions
|
@ -70,14 +70,11 @@ $(document).ready(function() {
|
|||
var $selectedLink = $(event.target);
|
||||
$(".supporter-type-selector a").removeClass("supporter-type-selector-selected");
|
||||
$selectedLink.addClass("supporter-type-selector-selected");
|
||||
$(".supporter-type-selection").each(function(index, element) {
|
||||
var $element = $(element);
|
||||
if (event.target.href.endsWith("#" + element.id)) {
|
||||
$element.show();
|
||||
} else {
|
||||
$element.hide();
|
||||
}
|
||||
});
|
||||
$(".supporter-type-selection").hide();
|
||||
var hashIndex = event.target.href.lastIndexOf('#');
|
||||
if (hashIndex > -1) {
|
||||
$(event.target.href.slice(hashIndex)).show();
|
||||
}
|
||||
$formCorrectionNeeded.addClass('hidden');
|
||||
return false;
|
||||
};
|
||||
|
@ -88,7 +85,7 @@ $(document).ready(function() {
|
|||
};
|
||||
$window.bind("hashchange", selectSupportTypeFromHash);
|
||||
var $selectorLink = selectSupportTypeFromHash();
|
||||
if (parseFloat($("form#annual").get(0).dataset.upgradeFromAmount) > 0) {
|
||||
if (parseFloat($("#annual form").data('upgradeFromAmount')) > 0) {
|
||||
supportTypeSelector("#annual").click();
|
||||
$(".supporter-type-selector").hide();
|
||||
}
|
||||
|
|
|
@ -58,11 +58,10 @@
|
|||
<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>
|
||||
<p><strong>Note:</strong> annual supporter is not an automatic renewal
|
||||
relationship. If you join today, you'll receive an email in about one year to remind you to
|
||||
optionally renew.</p>
|
||||
<form id="annual" class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="supporter"
|
||||
<form class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="supporter"
|
||||
data-upgrade-from-amount="{{ partial_amount }}">
|
||||
<div class="supporter-form-inputs">
|
||||
<input type="hidden" name="return" value="https://sfconservancy.org/supporter/thank-you.html" />
|
||||
|
@ -107,7 +106,7 @@
|
|||
<input type="radio" name="os1" value="joinListNo" />No<br/>
|
||||
<br />
|
||||
<br /></div>
|
||||
<div id="annual" class="supporter-form-submit">
|
||||
<div>
|
||||
<input type="image"
|
||||
src="/img/supporter-payment-button-annual.png"
|
||||
height="81" width="188"
|
||||
|
@ -120,12 +119,11 @@
|
|||
</div>
|
||||
<div id="monthly" class="supporter-type-selection">
|
||||
<h3>Join as an Monthly Supporter</h3>
|
||||
<a id="monthly"></a>
|
||||
<p>Monthly renewal is automatic. Also, monthly supporters might not receive tangible Supporter benefits (such as
|
||||
the t-shirt) until they've reached at least $60 in monthly supporter
|
||||
donations. However, they will be included immediately
|
||||
in the <a href="/sponsors/#supporters">Supporters' list</a>.</p>
|
||||
<form id="monthly" class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<form class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<div class="supporter-form-inputs">
|
||||
<input type="hidden" name="business" value="supporter@sfconservancy.org" />
|
||||
<input type="hidden" name="item_name" value="Conservancy Supporter, Monthly" />
|
||||
|
@ -173,7 +171,7 @@
|
|||
<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">
|
||||
<div>
|
||||
<input type="image"
|
||||
src="/img/supporter-payment-button-monthly.png"
|
||||
height="81" width="188"
|
||||
|
@ -187,11 +185,10 @@
|
|||
|
||||
<div id="renewal" class="supporter-type-selection">
|
||||
<h3 id="renew">Renew as an Annual Supporter</h3>
|
||||
<a id="renewal"></a>
|
||||
<p><strong>Note:</strong> This option is for existing annual supporters who
|
||||
seek to renew for another year. The annual renewal is not automatic;
|
||||
annual supporters are emailed each year to invite them to optionally renew. </p>
|
||||
<form id="renewal" class="supporter-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="supporter">
|
||||
<form 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" />
|
||||
|
@ -235,7 +232,7 @@
|
|||
<input type="radio" name="os1" value="joinListNo" />No<br/>
|
||||
<br />
|
||||
<br /></div>
|
||||
<div id="renewal" class="supporter-form-submit">
|
||||
<div>
|
||||
<input type="image"
|
||||
src="/img/supporter-payment-button-renewal.png"
|
||||
height="81" width="188"
|
||||
|
|
Loading…
Reference in a new issue