Wrap wizard buttons in a div

refs #7163
This commit is contained in:
Johannes Meyer 2014-10-06 11:07:21 +02:00
parent 5f68850443
commit 83006c014c
5 changed files with 33 additions and 12 deletions

View File

@ -60,6 +60,8 @@ $showRadioBoxes = strpos(strtolower(get_class($radioElem)), 'radio') !== false;
<?php endif ?>
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT); ?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT); ?>
</div>
</form>

View File

@ -22,12 +22,14 @@ $requirements = $form->getRequirements();
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>">
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?php
$btn = $form->getElement(Wizard::BTN_NEXT);
if (false === $requirements->fulfilled()) {
$btn->setAttrib('disabled', 1);
}
echo $btn;
?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?php
$btn = $form->getElement(Wizard::BTN_NEXT);
if (false === $requirements->fulfilled()) {
$btn->setAttrib('disabled', 1);
}
echo $btn;
?>
</div>
</form>

View File

@ -54,7 +54,9 @@ use Icinga\Web\Wizard;
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>">
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT)->setLabel(t('Install Icinga Web 2')); ?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT)->setLabel(t('Install Icinga Web 2')); ?>
</div>
</form>
</div>

View File

@ -469,6 +469,17 @@ class Wizard
)
);
}
$page->addDisplayGroup(
array(static::BTN_PREV, static::BTN_NEXT),
'buttons',
array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'div', 'class' => 'buttons'))
)
)
);
}
/**

View File

@ -1,3 +1,7 @@
#wizard div.buttons {
margin: 1.5em 0 0 1.8em;
}
#wizard table.requirements {
td {
&.fulfilled {