Fix setup form views and add link to install SC on initial station setup.

This commit is contained in:
Buster "Silver Eagle" Neece 2018-09-27 13:20:23 -05:00
parent b3289fa624
commit 5ad7ad5c5f
5 changed files with 24 additions and 9 deletions

View File

@ -52,7 +52,8 @@ Whether you're using the traditional installer or Docker containers, AzuraCast w
* **[Liquidsoap](https://www.liquidsoap.info/)** as the always-playing "AutoDJ"
* **[Icecast 2.4](https://icecast.org/)** as a radio broadcasting frontend (Icecast-KH installed on supported platforms)
* **[SHOUTcast 2 DNAS](http://wiki.shoutcast.com/wiki/SHOUTcast_DNAS_Server_2)** as an alternative radio frontend (x86/x64 only)
For x86/x64 installations, [SHOUTcast 2 DNAS](http://wiki.shoutcast.com/wiki/SHOUTcast_DNAS_Server_2) can also be used as a broadcasting frontend. SHOUTcast is non-free software and does not come bundled with AzuraCast, but can be installed via the administration panel after AzuraCast has been installed.
#### Supporting Software

View File

@ -1,11 +1,11 @@
<?php $this->layout('main', ['title' => __('SHOUTcast is Installed'), 'manual' => true]) ?>
<?php $this->layout('main', ['title' => __('SHOUTcast Installed'), 'manual' => true]) ?>
<div class="card">
<div class="card-header ch-alt">
<h2><?=__('SHOUTcast is Installed') ?></h2>
<h2><?=__('SHOUTcast Installed') ?></h2>
</div>
<div class="card-body card-padding">
<p><?=__('The SHOUTcast 2 DNAS is already installed.') ?></p>
<p><?=__('The SHOUTcast 2 DNAS is installed and ready for use.') ?></p>
</div>
</div>

View File

@ -10,6 +10,6 @@
<div><?=__('Complete the setup process by providing some information about your broadcast environment. These settings can be changed later from the administration panel.') ?></div>
</div>
<div class="card-body card-padding">
<?=$form->render() ?>
<?=$this->fetch('system/form_edit', ['form' => $form]) ?>
</div>
</div>
</div>

View File

@ -1,4 +1,13 @@
<?php $this->layout('main', ['title' => __('AzuraCast Setup'), 'manual' => true]); ?>
<?php
$this->layout('main', [
'title' => __('AzuraCast Setup'),
'manual' => true
]);
/** @var \App\Assets $assets */
$assets
->addInlineJs($this->fetch('partials/station_form.js'), 99);
?>
<div class="block-header">
<h2><?=__('AzuraCast Setup') ?></h2>
@ -10,6 +19,6 @@
<div><?=__('Continue the setup process by creating your first radio station below. You can edit any of these details later.') ?></div>
</div>
<div class="card-body card-padding">
<?=$this->fetch('partials/station_form', ['form' => $form]) ?>
<?=$this->fetch('system/form_edit', ['form' => $form]) ?>
</div>
</div>
</div>

View File

@ -5,6 +5,7 @@ use App\Acl;
use App\Auth;
use App\Radio\Adapters;
use App\Radio\Configuration;
use App\Radio\Frontend\SHOUTcast;
use Doctrine\ORM\EntityManager;
use App\Entity;
use App\Http\Request;
@ -147,6 +148,10 @@ class SetupController
unset($form_config['groups']['admin']);
unset($form_config['groups']['profile']['legend']);
if (!SHOUTcast::isInstalled()) {
$form_config['groups']['select_frontend_type']['elements']['frontend_type'][1]['description'] = __('Want to use SHOUTcast 2? <a href="%s" target="_blank">Install it here</a>, then reload this page.', $request->getRouter()->named('admin:install:shoutcast'));
}
$form = new \AzuraForms\Form($form_config);
if (!empty($_POST) && $form->isValid($_POST)) {