[finish #27015121] give focus to pledge amount box, select premium doesn't reduce pledge
parent
ef0ea5569a
commit
443c4b5d42
|
@ -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>
|
||||
|
|
|
@ -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);}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue