/** * @see Wizard::addButtons() */ protected function addButtons(Form $page) { parent::addButtons($page); $pages = $this->getPages(); $index = array_search($page, $pages, true); if ($index === 0) { // Used t() here as "Start" is too generic and already translated in the icinga domain $page->getElement(static::BTN_NEXT)->setLabel(t('Start', 'setup.welcome.btn.next')); } elseif ($index === count($pages) - 1) { $page->getElement(static::BTN_NEXT)->setLabel(mt('monitoring', 'Setup the monitoring module for Icinga Web 2', 'setup.summary.btn.finish')); } }
/** * Add buttons to the given page based on its position in the page-chain * * @param Form $page The page to add the buttons to */ protected function addButtons(Form $page) { parent::addButtons($page); $pages = $this->getPages(); $index = array_search($page, $pages, true); if ($index === 0) { // Used t() here as "Start" is too generic and already translated in the icinga domain $page->getElement(static::BTN_NEXT)->setLabel(t('Start', 'setup.welcome.btn.next')); } elseif ($index === count($pages) - 1) { $page->getElement(static::BTN_NEXT)->setLabel(mt('monitoring', 'Setup the monitoring module for Icinga Web 2', 'setup.summary.btn.finish')); } if ($page->getName() === 'setup_monitoring_ido') { $page->addElement('submit', 'backend_validation', array('ignore' => true, 'label' => t('Validate Configuration'), 'data-progress-label' => t('Validation In Progress'), 'decorators' => array('ViewHelper'))); $page->getDisplayGroup('buttons')->addElement($page->getElement('backend_validation')); } }
/** * Add buttons to the given page based on its position in the page-chain * * @param Form $page The page to add the buttons to */ protected function addButtons(Form $page) { parent::addButtons($page); $pages = $this->getPages(); $index = array_search($page, $pages, true); if ($index === 0) { $page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Start', 'setup.welcome.btn.next')); } elseif ($index === count($pages) - 1) { $page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Setup Icinga Web 2', 'setup.summary.btn.finish')); } }
/** * Add buttons to the given page based on its position in the page-chain * * @param Form $page The page to add the buttons to */ protected function addButtons(Form $page) { parent::addButtons($page); $pages = $this->getPages(); $index = array_search($page, $pages, true); if ($index === 0) { $page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Start', 'setup.welcome.btn.next')); } elseif ($index === count($pages) - 1) { $page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Setup Icinga Web 2', 'setup.summary.btn.finish')); } $authData = $this->getPageData('setup_authentication_type'); $veto = $page->getName() === 'setup_authentication_backend' && $authData['type'] === 'db'; if (!$veto && in_array($page->getName(), array('setup_authentication_backend', 'setup_auth_db_resource', 'setup_config_db_resource', 'setup_ldap_resource', 'setup_monitoring_ido'))) { $page->addElement('submit', 'backend_validation', array('ignore' => true, 'label' => t('Validate Configuration'), 'data-progress-label' => t('Validation In Progress'), 'decorators' => array('ViewHelper'))); $page->getDisplayGroup('buttons')->addElement($page->getElement('backend_validation')); } }