Move a form's title into the markup of its form

This commit is contained in:
Johannes Meyer 2015-03-03 09:53:25 +01:00
parent f7785ee04a
commit 642fa44fce
3 changed files with 5 additions and 9 deletions

View File

@ -909,16 +909,12 @@ class Form extends Zend_Form
'form' => $this 'form' => $this
)); ));
} else { } else {
$this->addDecorator('FormErrors', array('onlyCustomFormErrors' => true)) $this->addDecorator('Description', array('tag' => 'h1'))
->addDecorator('FormErrors', array('onlyCustomFormErrors' => true))
->addDecorator('FormDescriptions') ->addDecorator('FormDescriptions')
->addDecorator('FormElements') ->addDecorator('FormElements')
//->addDecorator('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form')) //->addDecorator('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form'))
->addDecorator('Form') ->addDecorator('Form');
->addDecorator('Description', array(
'placement' => 'prepend',
'class' => 'form-title',
'tag' => 'h1'
));
} }
} }

View File

@ -190,7 +190,7 @@ div.selection-info {
vertical-align: middle; vertical-align: middle;
} }
.object-command h1.form-title, .objects-command h1.form-title { .object-command form h1, .objects-command form h1 {
border: none; border: none;
} }

View File

@ -6,8 +6,8 @@ $radioElem = $form->getElement('user_type');
$showRadioBoxes = strpos(strtolower(get_class($radioElem)), 'radio') !== false; $showRadioBoxes = strpos(strtolower(get_class($radioElem)), 'radio') !== false;
?> ?>
<h1 class="form-title"><?= $this->translate('Administration', 'setup.page.title'); ?></h1>
<form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>"> <form id="<?= $form->getName(); ?>" name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
<h1><?= $this->translate('Administration', 'setup.page.title'); ?></h1>
<ul class="descriptions"> <ul class="descriptions">
<li><?= $this->translatePlural( <li><?= $this->translatePlural(
'Now it\'s time to configure your first administrative account for Icinga Web 2. Please follow the instructions below:', 'Now it\'s time to configure your first administrative account for Icinga Web 2. Please follow the instructions below:',