Added `'integer' => 'number'` for HTML5 #157

Merged
merged 3 commits into from Aug 2, 2011

Projects

None yet

3 participants

@ProLoser

Located in $map in the FormHelper::input() method. This means that if a field input is related to an integer column in the database, it will show up as a number input in the HTML5 form (where supported) yet gracefully degrade.

Dean Sofer added some commits Jul 26, 2011
Dean Sofer Added `'integer' => 'number'` for HTML5
Located in $map in the `FormHelper::input()` method. This means that if a field input is related to an integer column in the database, it will show up as a number input in the HTML5 form (where supported) yet gracefully degrade.
333f365
Dean Sofer Added test for HTML5 `FormHelper::input()` integer to number in $map 804e88b
@ProLoser

I attempted to make an accompanying test however I encountered some issues trying to properly setup PHPUnit for testing:

Warning (2): require_once(PHP/CodeCoverage/Filter.php) [function.require-once]: failed to open stream: No such file or directory [ROOT/vendors/PHPUnit/Autoload.php, line 46]
Fatal error: require_once() [function.require]: Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='/Users/Dean/Sites/cakephp/vendors/:.:/Applications/MAMP/bin/php5.3/lib/php') in /Users/Dean/Sites/cakephp/vendors/PHPUnit/Autoload.php on line 46

I didn't realize this CodeCoverage filter is now required, nor did I see any notes in the test.php file when PHPUnit isn't working.

@ADmad
CakePHP member

Why not use input type "number" for float columns too?

@ProLoser

Better? Now on to getting my patch rejected so we can move on lol.

@markstory markstory merged commit 4da671c into cakephp:2.0 Aug 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment