summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-05-25 10:51:07 +0200
committerAndrey Andreev <narf@devilix.net>2017-05-25 10:52:15 +0200
commit904a28b41dab825eea4d1a9258aec2ea99b9a9d6 (patch)
tree8a7571dfb7027aa78019c09624ae047484145f0d /system/helpers/form_helper.php
parentc9054be8617adb9418e8edb732d6e234f7024e82 (diff)
Merge pull request #5130 from aroche/patch-2
Allow arbitrary strings as extra attributes in form_label
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index a49eea803..75c6e5d47 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -610,13 +610,7 @@ if ( ! function_exists('form_label'))
$label .= ' for="'.$id.'"';
}
- if (is_array($attributes) && count($attributes) > 0)
- {
- foreach ($attributes as $key => $val)
- {
- $label .= ' '.$key.'="'.$val.'"';
- }
- }
+ $label .= _attributes_to_string($attributes);
return $label.'>'.$label_text.'</label>';
}