Problem: Billing is always on

Solution: Make billing configurable through LIBRETIME_ENABLE_BILLING and deactivate it

This should catch all the changes needed to deactive billing in LibreTime.

* [x] only call billing when it is enabled
* [x] let super admins edit their info
* [x] dont link to billing if it is disabled
This commit is contained in:
Lucas Bickel 2017-02-23 12:03:25 +01:00
parent 4557395a86
commit 6e03863fa1
11 changed files with 176 additions and 164 deletions

View file

@ -1,7 +1,7 @@
<h2><?php echo _("My Profile") ?></h2>
<div id="current-user-container">
<?php if(Application_Model_User::getCurrentUser()->isSuperAdmin()) : ?>
<?php if(LIBRETIME_ENABLE_BILLING === true && Application_Model_User::getCurrentUser()->isSuperAdmin()) : ?>
<div id="user_details_superadmin_message">
<p class="alert alert-error">
<?=sprintf(_("<b>Note:</b> Since you're the station owner, your account information can be edited in <a href=\"%s\">Billing Settings</a> instead."), "/billing/client");?>

View file

@ -9,7 +9,7 @@
</div>
<?php
if (Billing::isStationPodcastAllowed()) { ?>
if (LIBRETIME_ENABLE_BILLING === true && Billing::isStationPodcastAllowed()) { ?>
<h3 class="collapsible-header" id="soundcloud-heading"><span class="arrow-icon"></span><?php echo _("SoundCloud Settings") ?></h3>
<div class="collapsible-content" id="soundcloud-settings">
<?php echo $this->element->getSubform('preferences_soundcloud') ?>

View file

@ -26,9 +26,11 @@
</table>
</div>
</div>
<?php if (LIBRETIME_ENABLE_BILLING === true) { ?>
<div class="user-data" id="user_details_superadmin_message" style="display: none; margin-top: 105px; text-align: center;">
<?=sprintf(_("Super Admin details can be changed in your <a href=\"%s\">Billing Settings</a>."), "/billing/client");?>
</div>
<?php } ?>
<div class="user-data simple-formblock" id="user_details">
<?php echo $this->successMessage ?>
<fieldset class="padded">