diff --git a/www/conservancy/static/js/supporter-page.js b/www/conservancy/static/js/supporter-page.js index fe680458..d82eec08 100644 --- a/www/conservancy/static/js/supporter-page.js +++ b/www/conservancy/static/js/supporter-page.js @@ -19,7 +19,7 @@ var amountIsValid = function(amountInput) { } var supportTypeSelector = function(supportTypeHash) { - return $(".supporter-type-selector a[href=" + supportTypeHash + "]"); + return $(supportTypeHash + "Selector"); }; var $window = $(window); @@ -84,12 +84,7 @@ $(document).ready(function() { return supportTypeSelector(window.location.hash).click(); }; $window.bind("hashchange", selectSupportTypeFromHash); - var $selectorLink = selectSupportTypeFromHash(); - if (parseFloat($("#annual form").data('upgradeFromAmount')) > 0) { - supportTypeSelector("#annual").click(); - $(".supporter-type-selector").hide(); - } - else if ($selectorLink.length === 0) { + if (selectSupportTypeFromHash().length === 0) { supportTypeSelector("#annual").click(); } }); diff --git a/www/conservancy/templates/supporter/index.html b/www/conservancy/templates/supporter/index.html index 52d71a98..68213409 100644 --- a/www/conservancy/templates/supporter/index.html +++ b/www/conservancy/templates/supporter/index.html @@ -54,15 +54,23 @@
- +{% if partial_amount > 0 %} + {% include "supporter/form_partial.html" with form_id="annual" min_amt=minimum_amount partial_amt=partial_amount article="an" only %} +{% else %} + -{% include "supporter/form_partial.html" with form_id="annual" min_amt=minimum_amount partial_amt=partial_amount article="an" only %} + {% include "supporter/form_partial.html" with form_id="annual" min_amt=120 article="an" only %} -{% include "supporter/form_partial.html" with form_id="monthly" min_amt=10 only %} + {% include "supporter/form_partial.html" with form_id="monthly" min_amt=10 only %} - -{% include "supporter/form_partial.html" with form_id="renewal" min_amt=120 verb="renew" article="an" supptype="annual" only %} + + {% include "supporter/form_partial.html" with form_id="renewal" min_amt=120 verb="renew" article="an" supptype="annual" only %} +{% endif %} Please ensure all form data above is correct.