2014-09-29 12:26:54 +02:00
|
|
|
<?php
|
|
|
|
|
2015-02-26 10:52:39 +01:00
|
|
|
use \RecursiveIteratorIterator;
|
2014-09-29 12:26:54 +02:00
|
|
|
use Icinga\Web\Wizard;
|
|
|
|
|
|
|
|
$requirements = $form->getRequirements();
|
2015-02-26 10:52:39 +01:00
|
|
|
$iterator = new RecursiveIteratorIterator($requirements);
|
2014-09-29 12:26:54 +02:00
|
|
|
|
|
|
|
?>
|
2014-10-01 15:46:58 +02:00
|
|
|
<table class="requirements">
|
2014-09-29 12:26:54 +02:00
|
|
|
<tbody>
|
2015-02-26 10:52:39 +01:00
|
|
|
<?php foreach ($iterator as $requirement): ?>
|
2014-09-29 12:26:54 +02:00
|
|
|
<tr>
|
2015-02-25 13:38:38 +01:00
|
|
|
<td><h2><?= $requirement->getTitle(); ?></h2></td>
|
2015-01-22 12:47:18 +01:00
|
|
|
<td style="width: 50%">
|
2015-02-25 13:38:38 +01:00
|
|
|
<?php $descriptions = $requirement->getDescriptions(); ?>
|
|
|
|
<?php if (count($descriptions) > 1): ?>
|
2015-01-22 12:47:18 +01:00
|
|
|
<ul>
|
2015-02-25 13:38:38 +01:00
|
|
|
<?php foreach ($descriptions as $desc): ?>
|
2015-01-22 12:47:18 +01:00
|
|
|
<li><?= $desc; ?></li>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
2015-02-25 13:38:38 +01:00
|
|
|
<?php elseif (! empty($descriptions)): ?>
|
|
|
|
<?= $descriptions[0]; ?>
|
2015-01-22 12:47:18 +01:00
|
|
|
<?php endif ?>
|
|
|
|
</td>
|
2015-02-25 13:38:38 +01:00
|
|
|
<td class="state <?= $requirement->getState() ? 'fulfilled' : (
|
|
|
|
$requirement->isOptional() ? 'not-available' : 'missing'
|
|
|
|
); ?>"><?= $requirement->getStateText(); ?></td>
|
2014-09-29 12:26:54 +02:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
2014-11-10 12:54:26 +01:00
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td class="btn-update">
|
|
|
|
<div class="buttons">
|
2015-02-23 17:32:55 +01:00
|
|
|
<?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)
|
|
|
|
)
|
|
|
|
); ?>
|
2014-11-10 12:54:26 +01:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-09-29 12:26:54 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-10-27 09:01:00 +01:00
|
|
|
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
|
2014-09-29 12:26:54 +02:00
|
|
|
<?= $form->getElement($form->getTokenElementName()); ?>
|
|
|
|
<?= $form->getElement($form->getUidElementName()); ?>
|
2014-11-10 12:54:26 +01:00
|
|
|
<div class="buttons" style="margin: 0 0 1.5em;">
|
2014-10-06 11:07:21 +02:00
|
|
|
<?= $form->getElement(Wizard::BTN_PREV); ?>
|
|
|
|
<?php
|
|
|
|
$btn = $form->getElement(Wizard::BTN_NEXT);
|
|
|
|
if (false === $requirements->fulfilled()) {
|
|
|
|
$btn->setAttrib('disabled', 1);
|
|
|
|
}
|
|
|
|
echo $btn;
|
|
|
|
?>
|
|
|
|
</div>
|
2014-11-13 17:20:06 +01:00
|
|
|
</form>
|