Merge branch 'saas-showbuilder' of github.com:sourcefabric/airtime into saas-showbuilder
This commit is contained in:
commit
afa3b47e42
19 changed files with 422 additions and 104 deletions
|
@ -120,17 +120,43 @@ 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());
|
||||
recalculateTotals();
|
||||
|
||||
|
||||
$("input[name='newproductid']").change(function() {
|
||||
validatePlan();
|
||||
recalculateTotals();
|
||||
promoEligibilityCheck();
|
||||
});
|
||||
$("input[name='newproductbillingcycle']").change(function() {
|
||||
recalculateTotals();
|
||||
promoEligibilityCheck();
|
||||
});
|
||||
|
||||
$("#country").change(function() {
|
||||
|
@ -170,13 +196,17 @@ $(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>Hobbyist</th>
|
||||
<th>Starter</th>
|
||||
<th>Plus</th>
|
||||
<th>Premium</th>
|
||||
<th>Awesome Hobbyist</th>
|
||||
<th>Awesome Starter</th>
|
||||
<th>Awesome Plus</th>
|
||||
<th>Awesome Premium</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1 Stream
|
||||
|
@ -198,24 +228,40 @@ $(document).ready(function() {
|
|||
<td>64kbps, 128kbps, and 196kbps Stream Quality
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5 Listeners
|
||||
<tr class="august-promo">
|
||||
<td>
|
||||
<span>5 Listeners</span><br>
|
||||
<div>10 Listeners</div>
|
||||
</td>
|
||||
<td>40 Listeners per stream
|
||||
<td>
|
||||
<span>40 Listeners per stream</span><br>
|
||||
<div>80 Listeners per stream</div>
|
||||
</td>
|
||||
<td>100 Listeners per stream
|
||||
<td>
|
||||
<span>100 Listeners per stream</span><br>
|
||||
<div>200 Listeners per stream</div>
|
||||
</td>
|
||||
<td>500 Listeners per stream
|
||||
<td>
|
||||
<span>500 Listeners per stream</span><br>
|
||||
<div>1000 Listeners per stream</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2GB Storage
|
||||
<tr class="august-promo">
|
||||
<td>
|
||||
<span>2GB Storage</span><br>
|
||||
<div>4GB Storage</div>
|
||||
</td>
|
||||
<td>5GB Storage
|
||||
<td>
|
||||
<span>5GB Storage</span><br>
|
||||
<div>10GB Storage</div>
|
||||
</td>
|
||||
<td>30GB Storage
|
||||
<td>
|
||||
<span>30GB Storage</span><br>
|
||||
<div>60GB Storage</div>
|
||||
</td>
|
||||
<td>150GB Storage
|
||||
<td>
|
||||
<span>150GB Storage</span><br>
|
||||
<div>300GB Storage</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -264,6 +310,8 @@ echo($currentProduct["name"]);
|
|||
<h3>Choose a plan:</h3>
|
||||
<form id="<?php echo $form->getId(); ?>" method="<?php echo $form->getMethod() ?>" action="<?php echo
|
||||
$form->getAction()?>" enctype="<?php echo $form->getEncType();?>">
|
||||
|
||||
<?php echo $form->csrf ?>
|
||||
|
||||
<div id="plantype">
|
||||
<?php echo $form->newproductid ?>
|
||||
|
@ -274,6 +322,10 @@ 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>
|
||||
|
|
|
@ -18,9 +18,17 @@
|
|||
<div id="plupload_files"></div>
|
||||
</form>
|
||||
-->
|
||||
<div id="upload_form" class="lib-content ui-widget ui-widget-content block-shadow padded <?php if ($this->quotaLimitReached) { ?> hidden <?php } ?>">
|
||||
<div id="upload_form" class="lib-content ui-widget ui-widget-content block-shadow padded wide-panel <?php if ($this->quotaLimitReached) { ?> hidden <?php } ?>">
|
||||
<H2>Upload Audio Files</H2>
|
||||
<div>
|
||||
<?php
|
||||
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
||||
$status = new StdClass;
|
||||
$partitions = $partitions;
|
||||
$disk = $partitions[0];
|
||||
$used = $disk->totalSpace-$disk->totalFreeSpace;
|
||||
$total = $disk->totalSpace;
|
||||
?>
|
||||
<div style="height:100%">
|
||||
<form action="/rest/media" method="post" id="add-media-dropzone" class="dropzone dz-clickable">
|
||||
<?php echo $this->form->getElement('csrf') ?>
|
||||
<div class="dz-message">
|
||||
|
@ -37,14 +45,24 @@
|
|||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div id="disk_usage" style="position:absolute;width:95%; margin-top:10px; bottom: 10px;">
|
||||
<div style="padding-bottom: 2px;">Storage</div>
|
||||
<div class="disk_usage_progress_bar" style="width:98%"></div>
|
||||
<div class="disk_usage_percent_in_use" style="width:98%"><?php echo sprintf("%01.1f%% ", $used/$total*100) . _("in use") ?></div>
|
||||
<div class="disk_usage_used" style="width:<?php echo sprintf("%01.1f%%", $used/$total*100) ?>;"></div>
|
||||
|
||||
<div style="margin-top: 17px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30)); ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plupload_error">
|
||||
<table></table>
|
||||
</div>
|
||||
|
||||
<div id="recent_uploads_wrapper" class="lib-content ui-widget ui-widget-content block-shadow wide-panel">
|
||||
|
||||
<div id="recent_uploads_wrapper" class="lib-content ui-widget ui-widget-content block-shadow">
|
||||
<div id="recent_uploads" class="padded">
|
||||
<div id="recent_uploads" class="outer-datatable-wrapper padded">
|
||||
|
||||
<div id="recent_uploads_filter">
|
||||
<form>
|
||||
|
@ -54,8 +72,10 @@
|
|||
</form>
|
||||
</div>
|
||||
<H2><?php echo _("Recent Uploads")?></H2>
|
||||
<div class="dataTables_scrolling padded">
|
||||
<table id="recent_uploads_table" class="datatable lib-content ui-widget ui-widget-content block-shadow alpha-block "
|
||||
cellpadding="0" cellspacing="0"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue