aboutsummaryrefslogtreecommitdiff
path: root/views/installation/input/form.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/installation/input/form.php')
-rw-r--r--views/installation/input/form.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/installation/input/form.php b/views/installation/input/form.php
new file mode 100644
index 000000000..3556413a8
--- /dev/null
+++ b/views/installation/input/form.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Create a form for data submission.
+ *
+ * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
+ * @uses $vars['action'] URL of the action being called
+ * @uses $vars['method'] Method (default POST)
+ * @uses $vars['name'] Form name
+ */
+
+if (isset($vars['name'])) {
+ $name = "name=\"{$vars['name']}\"";
+} else {
+ $name = '';
+}
+
+$body = $vars['body'];
+$action = $vars['action'];
+if (isset($vars['method'])) {
+ $method = $vars['method'];
+} else {
+ $method = 'POST';
+}
+
+$method = strtolower($method);
+
+?>
+<form <?php echo $name; ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>">
+<?php echo $body; ?>
+</form> \ No newline at end of file