summaryrefslogtreecommitdiffstats
path: root/modules/setup/application/views/scripts/form/setup-requirements.phtml
blob: 544f284c66ceb9c20f5a7b4b1bad1f906243c822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php

use Icinga\Web\Wizard;

if (! $form->getWizard()->getRequirements()->fulfilled()) {
    $form->getElement(Wizard::BTN_NEXT)->setAttrib('disabled', 1);
}

?>
<h1>Icinga Web 2</h1>
<?= $form->getWizard()->getRequirements(true); ?>
<?php foreach ($form->getWizard()->getPage('setup_modules')->getModuleWizards() as $moduleName => $wizard): ?>
<h1><?= ucwords($moduleName) . ' ' . $this->translate('Module'); ?></h1>
<?= $wizard->getRequirements(); ?>
<?php endforeach ?>
<form
 id="<?= $this->escape($form->getName()); ?>"
 name="<?= $this->escape($form->getName()); ?>"
 enctype="<?= $this->escape($form->getEncType()); ?>"
 method="<?= $this->escape($form->getMethod()); ?>"
 action="<?= $this->escape($form->getAction()); ?>"
 data-progress-element="<?= Wizard::PROGRESS_ELEMENT; ?>"
>
  <?= $form->getElement($form->getTokenElementName()); ?>
  <?= $form->getElement($form->getUidElementName()); ?>
  <div class="buttons">
    <?php
      $double = clone $form->getElement(Wizard::BTN_NEXT);
      echo $double->setAttrib('class', 'double');
    ?>
    <?= $form->getElement(Wizard::BTN_PREV); ?>
    <?= $form->getElement(Wizard::BTN_NEXT); ?>
    <?= $form->getElement(Wizard::PROGRESS_ELEMENT); ?>
    <div class="requirements-refresh">
      <?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-link',
          'title'       => $title,
          'aria-label'  => sprintf($this->translate('Refresh the page; %s'), $title)
        )
      ); ?>
    </div>
  </div>
</form>