[finish #27015121] give focus to pledge amount box, select premium doesn't reduce pledge

pull/1/head
eric 2012-05-14 09:01:03 -04:00
parent ef0ea5569a
commit 443c4b5d42
2 changed files with 12 additions and 6 deletions

View File

@ -90,7 +90,7 @@
{% endfor %}
</ul>
<input type="submit" {% if faqmenu == 'modify' %}value="Modify Pledge"{% else %}value="Pledge"{% endif %} id="pledgesubmit" />
<input type="submit" {% if faqmenu == 'modify' %}value="Modify Pledge"{% else %}value="Pledge Now"{% endif %} id="pledgesubmit" />
</form>
</div>
</div>

View File

@ -1,12 +1,18 @@
// This autofills the pledge box when users select a premium tier.
var $j = jQuery.noConflict();
//give pledge box focus
$j(function() {
$j('#id_preapproval_amount').focus();
});
// This autofills the pledge box when users select a premium tier.
$j().ready(function() {
var inputbox = $j('#id_preapproval_amount');
$j('#premiums_list input').click(function() {
amount = $j(this).siblings('span.menu-item-price').html();
amount = amount.split('$')[1]
inputbox.val(amount);
amount = amount.split('$')[1];
current = inputbox.val();
if (current<amount)
{inputbox.val(amount);}
});
});
});