SAAS-976: September 1st: Undo the billing page changes for the August promotion

This commit is contained in:
drigato 2015-08-31 13:37:20 -04:00
parent 17074e5f70
commit fa340c3e30
5 changed files with 16 additions and 261 deletions

View file

@ -120,30 +120,6 @@ function configureByCountry(countryCode)
});
}
function promoEligibilityCheck()
{
var newproductid = $("input[type='radio'][name='newproductid']:checked").val();
// newproductid can be undefined if the client is currently on an old plan
// and they just change the billing cycle value without selecting a new plan type.
// In this case, let's not check if they are eligible for the promo because
// they won't be able to upgrade without selecting a new plan first.
if (newproductid === undefined) {
return;
}
var newproductbillingcycle = $("input[type='radio'][name='newproductbillingcycle']:checked").val();
$.post("/billing/promo-eligibility-check", {"newproductid": newproductid,
"newproductbillingcycle": newproductbillingcycle, "csrf_token": $("#csrf").attr('value')})
.success(function(data) {
if (data.result == true) {
$("#promo-plan-eligible").show();
} else if ($("#promo-plan-eligible").is(":visible")) {
$("#promo-plan-eligible").hide();
}
});
}
$(document).ready(function() {
configureByCountry($("#country").val());
@ -152,11 +128,9 @@ $(document).ready(function() {
$("input[name='newproductid']").change(function() {
validatePlan();
recalculateTotals();
promoEligibilityCheck();
});
$("input[name='newproductbillingcycle']").change(function() {
recalculateTotals();
promoEligibilityCheck();
});
$("#country").change(function() {
@ -196,17 +170,13 @@ $(document).ready(function() {
<div class="ui-widget ui-widget-content block-shadow clearfix padded-strong billing-panel">
<H2><?=_("Account Plans")?></H2>
<H4><?=_("Upgrade today to get more listeners and storage space!")?></H4>
<div>
<a href="https://www.airtime.pro/pricing#promo-details" target="_blank">
<img width="400px" height="133px" class="promo-banner" /></a>
</div>
<div class="pricing-grid">
<table>
<tr>
<th>Awesome Hobbyist</th>
<th>Awesome Starter</th>
<th>Awesome Plus</th>
<th>Awesome Premium</th>
<th>Hobbyist</th>
<th>Starter</th>
<th>Plus</th>
<th>Premium</th>
</tr>
<tr>
<td>1 Stream
@ -228,40 +198,24 @@ $(document).ready(function() {
<td>64kbps, 128kbps, and 196kbps Stream Quality
</td>
</tr>
<tr class="august-promo">
<td>
<span>5 Listeners</span><br>
<div>10 Listeners</div>
<tr>
<td>5 Listeners
</td>
<td>
<span>40 Listeners per stream</span><br>
<div>80 Listeners per stream</div>
<td>40 Listeners per stream
</td>
<td>
<span>100 Listeners per stream</span><br>
<div>200 Listeners per stream</div>
<td>100 Listeners per stream
</td>
<td>
<span>500 Listeners per stream</span><br>
<div>1000 Listeners per stream</div>
<td>500 Listeners per stream
</td>
</tr>
<tr class="august-promo">
<td>
<span>2GB Storage</span><br>
<div>4GB Storage</div>
<tr>
<td>2GB Storage
</td>
<td>
<span>5GB Storage</span><br>
<div>10GB Storage</div>
<td>5GB Storage
</td>
<td>
<span>30GB Storage</span><br>
<div>60GB Storage</div>
<td>30GB Storage
</td>
<td>
<span>150GB Storage</span><br>
<div>300GB Storage</div>
<td>150GB Storage
</td>
</tr>
<tr>
@ -322,10 +276,6 @@ echo($currentProduct["name"]);
<div id="billingcycle_disclaimer">
Save 15% on annual plans (Hobbyist plan excluded).
</div>
<div class="clearfix"></div>
<div id="promo-plan-eligible" style="display:none;">
Congratulations, you are eligible for an Awesome Promotional Plan!
</div>
<div class="clearfix"></div>
<div id="subtotal_box">
<b>Subtotal:</b><br>