diff options
author | Felix Favre <gnomus@gnomus.de> | 2014-12-06 20:01:47 +0100 |
---|---|---|
committer | Felix Favre <gnomus@gnomus.de> | 2014-12-06 20:01:47 +0100 |
commit | b97154d19ecafbb3b98734851ceb74c27109da82 (patch) | |
tree | 87dd18ed9a8a2b91adf41d7902ea7c4d8974cdf0 | |
parent | 20d4b1b1c3e6bc63a3af6fd1a794b7b2b4634d89 (diff) |
form_element helper now supports empty labels
-rw-r--r-- | includes/sys_template.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php index 4d4740d9..0e396a40 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -232,7 +232,11 @@ function form_select($name, $label, $values, $selected) { * Rendert ein Formular-Element */ function form_element($label, $input, $for = "") { - return '<div class="form-group">' . '<label for="' . $for . '">' . $label . '</label>' . $input . '</div>'; + if ($label == '') { + return '<div class="form-group">' . $input . '</div>'; + }else { + return '<div class="form-group">' . '<label for="' . $for . '">' . $label . '</label>' . $input . '</div>'; + } } /** |