From 63c0cf521f8097b0dadaf1228176dc38c7d897f6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 15 May 2014 18:28:24 +0200 Subject: Working on config.tgz composition through config modules --- inc/render.inc.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'inc/render.inc.php') diff --git a/inc/render.inc.php b/inc/render.inc.php index a3cef516..dff32798 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -39,6 +39,7 @@ class Render ', RENDER_DEFAULT_TITLE, self::$title, ' + @@ -93,6 +94,23 @@ class Render { self::$body .= self::$mustache->render(self::getTemplate($template), $params); } + + /** + * Add a dialog to the page output. + * + * @param string $title Title of the dialog window + * @param boolean $next URL to next dialog step, or false to hide the next button + * @param string $template template used to fill the dialog body + * @param array $params parameters for rendering the body template + */ + public static function addDialog($title, $next, $template, $params = false) + { + self::addTemplate('dialog-generic', array( + 'title' => $title, + 'next' => $next, + 'body' => self::$mustache->render(self::getTemplate($template), $params) + )); + } /** * Add error message to page -- cgit v1.2.3-55-g7522