Changeset - 1327b684d63c
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 7 years ago 2015-03-09 04:31:42
bkuhn@ebb.org
Use supporter-page.js & its formatting conventions

The npoacct campaign was launched before the Supporter program, and
parts of its functionality were incorporated into supporter-page.js
ultimately. This commit hopefully now backports that functionality to
npoacct campaign.
1 file changed with 5 insertions and 39 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">
 
  $(document).ready(function() {
 
    $("#progressbar").progressbar({ value: (66274.98 / 75000) * 100 });
 

	
 
    $('.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');
 

	
 
        $control.toggleClass('expanded');
 
        $control.find('.toggle-content').slideUp("slow");
 
        $control.find('.toggle-content').slideDown("slow");
 
    });
 
  });
 
</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>
...
 
@@ -127,29 +94,28 @@ el.attachEvent('on'+ev, function() {handler.apply(el);});
 
            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>
 
-->
 
${{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }} raised toward<br/>
 
our ${{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }} goal.<br/>
 
<div id="progressbar"><span style="float:right; align:center;
 
                                   margin-right:40%">{{ fundgoal.percentage_there|floatformat:1 }}%</span></div>
 
<p style="font-size: 75%">(Progress bar updated monthly.)</p>
 
$<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" style="float:right; align:center; margin-right:40%">{{ 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>
 

	
 
<!-- 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 -->
 

	
0 comments (0 inline, 0 general)