summaryrefslogtreecommitdiffstats
path: root/inc/render.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/render.inc.php')
-rw-r--r--inc/render.inc.php18
1 files changed, 18 insertions, 0 deletions
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
<html>
<head>
<title>', RENDER_DEFAULT_TITLE, self::$title, '</title>
+ <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="style/bootstrap.min.css" rel="stylesheet" media="screen">
@@ -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