aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/form.php
diff options
context:
space:
mode:
authorEvan Winslow <evan.b.winslow@gmail.com>2010-10-21 17:46:39 +0000
committerEvan Winslow <evan.b.winslow@gmail.com>2010-10-21 17:46:39 +0000
commit9ff9d71952db26c06fe2eb1bf98b53340242e524 (patch)
treefa0a068d6a024d029246691c0c67f1b5e83d2ede /views/default/input/form.php
parent1bb750cdf821416584dc42206a29dae7c41144a5 (diff)
downloadelgg-9ff9d71952db26c06fe2eb1bf98b53340242e524.tar.gz
elgg-9ff9d71952db26c06fe2eb1bf98b53340242e524.tar.bz2
Removed html/tag view -- all we really needed was a function to form an attribute string from an array. This is now being used in each input view and there is not so much view nesting going on...
Diffstat (limited to 'views/default/input/form.php')
-rw-r--r--views/default/input/form.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/views/default/input/form.php b/views/default/input/form.php
index c30dd5c9a..565db3afe 100644
--- a/views/default/input/form.php
+++ b/views/default/input/form.php
@@ -10,17 +10,24 @@
* @link http://elgg.org/
*
* @uses $vars['body'] The body of the form (made up of other input/xxx views and html
- * @uses $vars['method'] Method (default POST)
- * @uses $vars['enctype'] How the form is encoded, default blank
- * @uses $vars['action'] URL of the action being called
* @uses $vars['disable_security'] Force the securitytokens not to be added to this form (@todo what's the point??)
*
*/
+$defaults = array(
+ 'body' => '',
+ 'method' => 'POST',
+);
+
+$vars = array_merge($defaults, $vars);
if ($vars['disable_security'] != TRUE) {
- $vars['body'] .= elgg_view('input/securitytoken');
+ $body .= elgg_view('input/securitytoken');
}
-
unset($vars['disable_security']);
-echo elgg_view('html/form', $vars);
+$body = $vars['body'];
+unset($vars['body']);
+
+$attributes = html5_get_html_attributes($vars);
+
+echo "<form $attributes>$body</form>";