Changeset 1498
- Timestamp:
- 12/12/07 12:32:17 (9 months ago)
- Location:
- trunk/modules/forge/libraries
- Files:
-
- 2 modified
-
Forge.php (modified) (3 diffs)
-
Form_Dropdown.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/forge/libraries/Forge.php
r1461 r1498 15 15 protected $hidden = array(); 16 16 17 public function __construct($action = '', $title = '', $method = 'post')17 public function __construct($action = '', $title = '', $method = NULL, $class = NULL) 18 18 { 19 empty($method) and $method = 'post'; 20 empty($class) and $class = 'form'; 21 19 22 // Set action 20 23 $this->template['action'] = $action; … … 104 107 } 105 108 109 /** 110 * Creates the form HTML 111 * 112 * @param string form view template name 113 * @return string 114 */ 106 115 public function html($template = 'forge_template') 107 116 { … … 128 137 } 129 138 139 /** 140 * Returns the form HTML 141 */ 142 public function __toString() 143 { 144 return $this->html(); 145 } 146 130 147 } // End Forge -
trunk/modules/forge/libraries/Form_Dropdown.php
r1439 r1498 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 3 class Form_Dropdown_Core extends Form_ input{3 class Form_Dropdown_Core extends Form_Input { 4 4 5 5 protected $data = array … … 30 30 $selected = arr::remove('selected', $base_data); 31 31 32 // Add an empty option to the beginning of the options33 arr::unshift_assoc($options, '', '--');34 35 32 return form::dropdown($base_data, $options, $selected); 36 33 }
