setup: Ensure that the next-button double is always shown

fixes #9245
This commit is contained in:
Johannes Meyer 2015-08-28 10:49:26 +02:00
parent 31903b8da9
commit 6d77ade6ac
3 changed files with 12 additions and 16 deletions

View File

@ -24,9 +24,5 @@ use Icinga\Web\Wizard;
<?php endforeach ?>
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT); ?>
<?= $form->getElement(Wizard::PROGRESS_ELEMENT); ?>
</div>
<?= $form->getDisplayGroup('buttons'); ?>
</form>

View File

@ -2,6 +2,10 @@
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); ?>
@ -20,14 +24,12 @@ use Icinga\Web\Wizard;
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?php
$btn = $form->getElement(Wizard::BTN_NEXT);
if (! $form->getWizard()->getRequirements()->fulfilled()) {
$btn->setAttrib('disabled', 1);
}
echo $btn;
$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!'); ?>

View File

@ -2,6 +2,8 @@
use Icinga\Web\Wizard;
$form->getElement(Wizard::BTN_NEXT)->setAttrib('class', 'finish');
?>
<p><?= sprintf(
$this->translate(
@ -31,9 +33,5 @@ use Icinga\Web\Wizard;
>
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
<div class="buttons">
<?= $form->getElement(Wizard::BTN_PREV); ?>
<?= $form->getElement(Wizard::BTN_NEXT)->setAttrib('class', 'finish'); ?>
<?= $form->getElement(Wizard::PROGRESS_ELEMENT); ?>
</div>
<?= $form->getDisplayGroup('buttons'); ?>
</form>