mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
Fix references to PP form and add different options
This commit is contained in:
parent
9fbe7ce690
commit
2d48323943
@ -1,28 +1,29 @@
|
|||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
function addRecurringFields(page) {
|
function addRecurringFields(period, page) {
|
||||||
|
|
||||||
// Add recurring fields to form
|
// Add recurring fields to form
|
||||||
$("<input type='hidden' name='a3' class='pprecurring' />")
|
$("<input type='hidden' name='a3' class='pprecurring' />")
|
||||||
.attr('value', $('#donateAmt', page).val())
|
.attr('value', $('#donateAmt', page).val())
|
||||||
.appendTo("#payPalForm", page);
|
.appendTo("#payPalSupporterForm", page);
|
||||||
|
|
||||||
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
|
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
|
||||||
.appendTo("#payPalForm", page);
|
.appendTo("#payPalSupporterForm", page);
|
||||||
|
|
||||||
$("<input type='hidden' name='t3' value='M' class='pprecurring' />")
|
$("<input type='hidden' name='t3' value='"+period+"' class='pprecurring' />")
|
||||||
.appendTo("#payPalForm", page);
|
.appendTo("#payPalSupporterForm", page);
|
||||||
|
|
||||||
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
|
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
|
||||||
.appendTo("#payPalForm", page);
|
.appendTo("#payPalSupporterForm", page);
|
||||||
|
|
||||||
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
|
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
|
||||||
.appendTo("#payPalForm", page);
|
.appendTo("#payPalSupporterForm", page);
|
||||||
|
|
||||||
//change command for subscriptions
|
//change command for subscriptions
|
||||||
$('#ppCmd', page).val('_xclick-subscriptions');
|
$('#ppCmd', page).val('_xclick-subscriptions');
|
||||||
|
|
||||||
$('#payPalForm', page).trigger('create');
|
$('#payPalSupporterForm', page).trigger('create');
|
||||||
|
console.log($('#payPalSupporterForm', page).html());
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeRecurringFields(page) {
|
function removeRecurringFields(page) {
|
||||||
@ -141,14 +142,14 @@
|
|||||||
else if (donationType == 'yearly') {
|
else if (donationType == 'yearly') {
|
||||||
|
|
||||||
$('.fldOneTimeDonationAmount', page).hide();
|
$('.fldOneTimeDonationAmount', page).hide();
|
||||||
addRecurringFields(page);
|
addRecurringFields('Y', page);
|
||||||
setItemNumber(page, 'MBSClubYearly');
|
setItemNumber(page, 'MBSClubYearly');
|
||||||
$('#oneTimeDescription').hide();
|
$('#oneTimeDescription').hide();
|
||||||
}
|
}
|
||||||
else if (donationType == 'monthly') {
|
else if (donationType == 'monthly') {
|
||||||
|
|
||||||
$('.fldOneTimeDonationAmount', page).hide();
|
$('.fldOneTimeDonationAmount', page).hide();
|
||||||
addRecurringFields(page);
|
addRecurringFields('M', page);
|
||||||
setItemNumber(page, 'MBSClubMonthly');
|
setItemNumber(page, 'MBSClubMonthly');
|
||||||
$('#oneTimeDescription').hide();
|
$('#oneTimeDescription').hide();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user