Permalink
Browse files

fix(forms): empty form body no longer wrapped in a form tag

Forms with empty body no longer get wrapped in form and fieldset tags. This
fixes a number of UI problems, where empty elements are wrapped with e.g.
by a module
  • Loading branch information...
hypeJunction committed Apr 18, 2016
1 parent c28e0e5 commit dc68d04ec92a482b561dfd00c0158838bf83dd43
Showing with 4 additions and 0 deletions.
  1. +4 −0 views/default/input/form.php
@@ -31,6 +31,10 @@
$body = $vars['body'];
unset($vars['body']);
+if (empty($body)) {
+ return;
+}
+
// Generate a security header
if (!$vars['disable_security']) {
$body = elgg_view('input/securitytoken') . $body;

0 comments on commit dc68d04

Please sign in to comment.