Add note to login page when the configuration directory is missing
refs #7163 refs #7409
This commit is contained in:
parent
a5b10235d2
commit
b4a69792d8
|
@ -145,6 +145,8 @@ class AuthenticationController extends ActionController
|
|||
} catch (Exception $e) {
|
||||
$this->view->errorInfo = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->view->configMissing = count($config->toArray()) === 0 && false === is_dir(Config::$configDir);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,5 +15,17 @@
|
|||
<?php endif ?>
|
||||
<?= $this->form ?>
|
||||
<div class="footer">Icinga Web 2 © 2013-2014 Icinga Team</div>
|
||||
<?php if ($configMissing): ?>
|
||||
<div class="config-note"><?= sprintf(
|
||||
t(
|
||||
'You seem not to have Icinga Web 2 configured yet so it\'s not possible to log in without any defined '
|
||||
. 'authentication method. Please define a authentication method by following the instructions in the'
|
||||
. ' %1$sdocumentation%3$s or by using our %2$sweb-based installer%3$s.'
|
||||
),
|
||||
'<a href="' . 'documention-link-here' . '" title="Icinga Web 2 Documentation">', // TODO: Documentation link
|
||||
'<a href="' . $this->href('setup') . '" title="Icinga Web 2 Installer">',
|
||||
'</a>'
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -100,4 +100,13 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
div.config-note {
|
||||
width: 50%;
|
||||
padding: 1em;
|
||||
margin: 5em auto 0;
|
||||
text-align: center;
|
||||
border-radius: 0.5em;
|
||||
border: 2px solid coral;
|
||||
background-color: beige;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue