Changeset 2038

Show
Ignore:
Timestamp:
02/12/08 18:12:54 (5 months ago)
Author:
Shadowhand
Message:

Fixing #396, thanks James.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/modules/forge/libraries/Form_Checkbox.php

    r1923 r2038  
    3333        } 
    3434 
     35        public function label($val = NULL) 
     36        { 
     37                if ($val === NULL) 
     38                { 
     39                        // Do not display labels for checkboxes, labels wrap checkboxes 
     40                        return ''; 
     41                } 
     42                else 
     43                { 
     44                        $this->data['label'] = ($val === TRUE) ? utf8::ucwords(inflector::humanize($this->name)) : $val; 
     45                        return $this; 
     46                } 
     47        } 
     48 
    3549        protected function html_element() 
    3650        {