Show a warning on the first page in case the user already configured web2
refs #7163
This commit is contained in:
parent
9365e3ca94
commit
a7e942cdc9
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Platform;
|
||||
use Icinga\Web\Wizard;
|
||||
|
||||
|
@ -33,10 +34,17 @@ $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
|
|||
. t('insights', 'setup.welcome.screenshots.label') . '</a>'
|
||||
); ?></p>
|
||||
</div>
|
||||
<?php if (false === file_exists($setupTokenPath) && file_exists(Config::resolvePath('config.ini'))): ?>
|
||||
<p class="restart-warning"><?= t(
|
||||
'You\'ve already completed the installation of Icinga Web 2. Note that most of your configuration'
|
||||
. ' files will be overwritten in case you\'ll re-configure Icinga Web 2 using this wizard!'
|
||||
); ?></p>
|
||||
<?php else: ?>
|
||||
<p><?= t(
|
||||
'This wizard will guide you through the installation of Icinga Web 2. Once completed and successfully'
|
||||
. ' finished you are able to log in and to explore all the new and stunning features!'
|
||||
); ?></p>
|
||||
<?php endif ?>
|
||||
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
|
||||
<?= $form->getElement('token'); ?>
|
||||
<?= $form->getElement($form->getTokenElementName()); ?>
|
||||
|
|
|
@ -306,6 +306,11 @@
|
|||
border: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
p.restart-warning {
|
||||
color: coral;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.note {
|
||||
width: 40%;
|
||||
padding: 1em 1em 0;
|
||||
|
|
Loading…
Reference in New Issue