Coding Standards
Changed to using null instead of '' and remove the ': ' at the end of the label value. (Though I myself quite like this..)
This commit is contained in:
1 parent
9587c6ccf9
commit
b26a9e1072
1 file changed
+4
-3
+4
-3
@@ -176,14 +176,15 @@ class FormBuilder {
|
||||
* @param array $options
|
||||
* @return string
|
||||
*/
|
||||
public function label($name, $value='', $options = array())
|
||||
public function label($name, $value=null, $options = array())
|
||||
{
|
||||
$this->labels[] = $name;
|
||||
|
||||
$options = $this->html->attributes($options);
|
||||
|
||||
if (!$value) {
|
||||
$value = ucfirst(str_replace('_', ' ', $name)) . ': ';
|
||||
if (is_null($value))
|
||||
{
|
||||
$value = ucfirst(str_replace('_', ' ', $name));
|
||||
}
|
||||
|
||||
return '<label for="'.$name.'"'.$options.'>'.e($value).'</label>';
|
||||
|
||||
Reference in new issue
Block a user