diff options
author | CHItA <mate.bartus@gmail.com> | 2015-06-11 19:32:11 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-08 01:28:02 +0200 |
commit | db4cfa7df62d5911bc5a0edcdc59236c39aede08 (patch) | |
tree | 35c6a99c900a0b9a3fa5db0e8d60e39045ed6591 /phpBB/install/helper/iohandler/ajax_iohandler.php | |
parent | 1b81bf5b2370c045a6369705d2a11a2b35fe2281 (diff) | |
download | forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.gz forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.bz2 forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.xz forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.zip |
[ticket/13740] Add navigation bar support for the installer
Also added various UI elements and texts.
[ci skip]
PHPBB3-13740
Diffstat (limited to 'phpBB/install/helper/iohandler/ajax_iohandler.php')
-rw-r--r-- | phpBB/install/helper/iohandler/ajax_iohandler.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/phpBB/install/helper/iohandler/ajax_iohandler.php b/phpBB/install/helper/iohandler/ajax_iohandler.php index 960dd615b5..71571fecba 100644 --- a/phpBB/install/helper/iohandler/ajax_iohandler.php +++ b/phpBB/install/helper/iohandler/ajax_iohandler.php @@ -34,6 +34,16 @@ class ajax_iohandler extends iohandler_base protected $form; /** + * @var bool + */ + protected $request_client_refresh; + + /** + * @var array + */ + protected $nav_data; + + /** * Constructor * * @param \phpbb\request\request_interface $request HTTP request interface @@ -44,6 +54,7 @@ class ajax_iohandler extends iohandler_base $this->request = $request; $this->template = $template; $this->form = ''; + $this->nav_data = array(); parent::__construct(); } @@ -89,6 +100,8 @@ class ajax_iohandler extends iohandler_base // This code is pretty ugly... but works // + $this->template->assign_var('S_FORM_ELEM_COUNT', sizeof($form)); + $this->template->assign_block_vars('options', array( 'LEGEND' => $this->language->lang($title), 'S_LEGEND' => true, @@ -187,9 +200,21 @@ class ajax_iohandler extends iohandler_base ); } + if (!empty($this->nav_data)) + { + $json_array['nav'] = $this->nav_data; + } + $this->errors = array(); $this->warnings = array(); $this->logs = array(); + $this->nav_data = array(); + + if ($this->request_client_refresh) + { + $json_array['refresh'] = true; + $this->request_client_refresh = false; + } return $json_array; } @@ -204,6 +229,32 @@ class ajax_iohandler extends iohandler_base } /** + * {@inheritdoc} + */ + public function request_refresh() + { + $this->request_client_refresh = true; + } + + /** + * {@inheritdoc} + */ + public function set_active_stage_menu($menu_path) + { + $this->nav_data['active'] = $menu_path[sizeof($menu_path) - 1]; + $this->send_response(); + } + + /** + * {@inheritdoc} + */ + public function set_finished_stage_menu($menu_path) + { + $this->nav_data['finished'][] = $menu_path[sizeof($menu_path) - 1]; + $this->send_response(); + } + + /** * Callback function for language replacing * * @param array $matches |