mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
parent
94d727dbb8
commit
c4c248cbb7
@ -19,7 +19,7 @@ class ModulePage extends Form
|
|||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->setName('setup_modules');
|
$this->setName('setup_modules');
|
||||||
//$this->setViewScript('form/setup-modules.phtml');
|
$this->setViewScript('form/setup-modules.phtml');
|
||||||
|
|
||||||
$this->modulePaths = array();
|
$this->modulePaths = array();
|
||||||
if (($appModulePath = realpath(Icinga::app()->getApplicationDir() . '/../modules')) !== false) {
|
if (($appModulePath = realpath(Icinga::app()->getApplicationDir() . '/../modules')) !== false) {
|
||||||
@ -34,15 +34,11 @@ class ModulePage extends Form
|
|||||||
'checkbox',
|
'checkbox',
|
||||||
$module->getName(),
|
$module->getName(),
|
||||||
array(
|
array(
|
||||||
|
'required' => true,
|
||||||
|
'description' => $module->getDescription(),
|
||||||
'label' => ucfirst($module->getName()),
|
'label' => ucfirst($module->getName()),
|
||||||
'value' => $module->getName() === 'monitoring' ? 1 : 0
|
'value' => $module->getName() === 'monitoring' ? 1 : 0,
|
||||||
)
|
'decorators' => array('ViewHelper')
|
||||||
);
|
|
||||||
$this->addElement(
|
|
||||||
'note',
|
|
||||||
$module->getName() . '_desc',
|
|
||||||
array(
|
|
||||||
'value' => $module->getDescription()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Icinga\Web\Wizard;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
|
||||||
|
<h2><?= $this->translate('Modules', 'setup.page.title'); ?></h2>
|
||||||
|
<p><?= $this->translate('The following modules were found in your Icinga Web 2 installation. To enable and configure a module, just tick it and click "Next".'); ?></p>
|
||||||
|
<?php foreach ($form->getElements() as $element): ?>
|
||||||
|
<?php if (! in_array($element->getName(), array(Wizard::BTN_PREV, Wizard::BTN_NEXT, $form->getTokenElementName(), $form->getUidElementName()))): ?>
|
||||||
|
<div class="module">
|
||||||
|
<h3><label for="<?= $element->getId(); ?>"><strong><?= $element->getLabel(); ?></strong></label></h3>
|
||||||
|
<label for="<?= $element->getId(); ?>"><?= $element->getDescription(); ?></label>
|
||||||
|
<?= $element; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?= $form->getElement($form->getTokenElementName()); ?>
|
||||||
|
<?= $form->getElement($form->getUidElementName()); ?>
|
||||||
|
<div class="buttons">
|
||||||
|
<?= $form->getElement(Wizard::BTN_PREV); ?>
|
||||||
|
<?= $form->getElement(Wizard::BTN_NEXT); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
@ -394,3 +394,45 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#setup_modules {
|
||||||
|
div.module {
|
||||||
|
float: left;
|
||||||
|
width: 15em;
|
||||||
|
height: 15em;
|
||||||
|
margin: 1em;
|
||||||
|
padding: 0.3em;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background-color: snow;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
border: none;
|
||||||
|
margin: 0.5em 0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
label {
|
||||||
|
margin: 0;
|
||||||
|
width: 15em;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 + label {
|
||||||
|
width: 13.5em;
|
||||||
|
height: 13.9em;
|
||||||
|
overflow: auto;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] {
|
||||||
|
height: 10em;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div.buttons {
|
||||||
|
padding-top: 1em;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user