mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-04-20 21:57:53 -04:00
64 lines
2 KiB
PHTML
64 lines
2 KiB
PHTML
<?php
|
|
|
|
use Icinga\Web\Wizard;
|
|
use Icinga\Module\Setup\Requirements;
|
|
|
|
$requirements = $form->getRequirements();
|
|
|
|
?>
|
|
<table class="requirements">
|
|
<tbody>
|
|
<?php foreach ($requirements as $requirement): ?>
|
|
<tr>
|
|
<td><h2><?= $requirement->title; ?></h2></td>
|
|
<td style="width: 50%">
|
|
<?php if (is_array($requirement->description)): ?>
|
|
<ul>
|
|
<?php foreach ($requirement->description as $desc): ?>
|
|
<li><?= $desc; ?></li>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
<?php else: ?>
|
|
<?= $requirement->description; ?>
|
|
<?php endif ?>
|
|
</td>
|
|
<td class="state <?= $requirement->state === Requirements::STATE_OK ? 'fulfilled' : (
|
|
$requirement->state === Requirements::STATE_OPTIONAL ? 'not-available' : 'missing'
|
|
); ?>"><?= $requirement->message; ?></td>
|
|
</tr>
|
|
<?php endforeach ?>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td class="btn-update">
|
|
<div class="buttons">
|
|
<?php $title = $this->translate('You may also need to restart the web-server for the changes to take effect!'); ?>
|
|
<?= $this->qlink(
|
|
$this->translate('Refresh'),
|
|
null,
|
|
null,
|
|
array(
|
|
'class' => 'button-like',
|
|
'title' => $title,
|
|
'aria-label' => sprintf($this->translate('Refresh the page; %s'), $title)
|
|
)
|
|
); ?>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
|
|
<?= $form->getElement($form->getTokenElementName()); ?>
|
|
<?= $form->getElement($form->getUidElementName()); ?>
|
|
<div class="buttons" style="margin: 0 0 1.5em;">
|
|
<?= $form->getElement(Wizard::BTN_PREV); ?>
|
|
<?php
|
|
$btn = $form->getElement(Wizard::BTN_NEXT);
|
|
if (false === $requirements->fulfilled()) {
|
|
$btn->setAttrib('disabled', 1);
|
|
}
|
|
echo $btn;
|
|
?>
|
|
</div>
|
|
</form>
|