Changeset - 8b16abf981e5
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 9 years ago 2014-12-02 21:27:37
bkuhn@ebb.org
PayPal seems to be ok with commas.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -16,49 +16,49 @@ $(document).ready(function() {
 
        $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");
 
    });
 
    $('#amount').on('input', function() {
 
        var input=$(this);
 
        var value = input.val();
 
        var errorElement=$("span", input.parent());
 

	
 
        var re = /^[0-9\.]+$/;
 
        var re = /^[0-9\,\.]+$/;
 
        var isValid = (re.test(value) && parseInt(value) >= 120);
 
        if (isValid)  {
 
           input.removeClass("invalid").addClass("valid");
 
           errorElement.removeClass("form-error-show").addClass("form-error");
 
        }
 
        else {
 
            input.removeClass("valid").addClass("invalid");
 
            errorElement.removeClass("form-error").addClass("form-error-show");
 
        }
 
    });
 
    /* 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#monthly').show();
 
        $('#monthlySelector').css("font-weight", "bold").css("font-size", "127%");
 
        $('#annualSelector').css("font-weight", "normal").css("font-size", "125%");
 
    });
 
    $("a[href$='annual']").bind('click', function() {
 
        $('.supporter-type-selection#annual').show();
 
        $('.supporter-type-selection#monthly').hide();
 
        $('#annualSelector').css("font-weight", "bold").css("font-size", "127%");
0 comments (0 inline, 0 general)