Commit graph

222 commits

Author SHA1 Message Date
mark_story
f1d192f282 Fix issue with midnight hour & 12hr formats.
No hour would be selected in the case of 12hr formats and a time like
00:xx:yy
2013-03-13 20:56:04 -04:00
euromark
a07c9f0c3c Fix FormHelper year range for ranges outside of 1901-2038 2013-03-05 22:11:23 +01:00
Renan Gonçalves
fd72f894ad Expanding year range based on the provided value.
This solves issues where editing a record with a year outside the year range would leave the year selection empty, as now it will expand to accomodate the value.
2013-03-01 13:45:55 +01:00
euromark
111366d5c8 == to === and != to !== where applicable 2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883 Added extra line for referencing license file for copyright 2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4 This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
euromark
d522f412db Fix disabled elements as array for multiple select and make in_array() work properly here, fix same in_array issues for radio elements and move tests correctly - #1105 2013-02-07 15:36:00 +01:00
euromark
ee08fe5c1f BC fixes for disabled checkboxes
see: d504642
see: #3545

Signed-off-by: Rachman Chavik <rchavik@xintesa.com>
2013-01-31 09:44:35 +07:00
Rachman Chavik
1cb24384cd Merge branch '2.2' 2013-01-31 09:42:55 +07:00
euromark
d504642c9b BC fixes for habtm. Closes #3545.
Signed-off-by: Rachman Chavik <rchavik@xintesa.com>
2013-01-30 21:11:41 +07:00
mark_story
78b23d8e31 Fix issue with inputs() and plugin models.
inputs() should not trigger errors when generating inputs for plugin
models. Previously the internal state of FormHelper was incorrect as
model() returned the plugin name instead of the modelname.

Fixes #3571
2013-01-29 22:02:21 -05:00
ADmad
422ceaff85 Added "tel" and "email" input type guessing.
Closes #3557
2013-01-27 08:59:54 +05:30
mark_story
4af6039107 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Model/Model.php
2013-01-26 21:16:26 -05:00
mark_story
ce7f85abe8 Fix Token fields being added to GET forms.
They are not used so there is not much point in appending them.

Fixes #3565
2013-01-25 15:21:16 -05:00
Mark Story
bc4db91b51 Merge pull request #864 from dereuromark/2.3-radio-multiple-between
allow between to be an array of strings

Fixes #2859
2013-01-25 12:06:55 -08:00
ADmad
82f34c4cb3 Don't set "required" attribute for checkboxes (unless explicitly specified).
Adding it prevents user from submitting form with checkbox unchecked when the "boolean" validation rule is specified for the field.
Closes #3560
2013-01-23 20:38:24 +05:30
johnymonster
84b10ba707 Strict in_array for mixed id variable types
Setting the in_array check to strict, as this would return true
incorrectly when and if values are of mixed type.
2013-01-17 14:14:12 -05:00
mark_story
d0d13acaf4 Merge branch 'master' into 2.3 2013-01-08 20:15:46 -05:00
mark_story
3f21d09c1d Fix radio() and boolean values.
Boolean values should be cast to integer equivalents, which allows
for correct handling of boolean columns and their string equivalents
used in form options.

Fixes #3512
2013-01-07 21:12:53 -05:00
euromark
b811afbc44 double spaces to single ones 2012-12-22 23:48:15 +01:00
ADmad
8ef2c22c29 Added "required" attribute to input element based on validation rules for field 2012-12-21 23:20:40 +05:30
mark_story
554d5794ce Merge branch 'master' into 2.3 2012-12-19 21:18:52 -05:00
ADmad
d16a9ab98e Fix error when no model scope is set 2012-12-20 02:32:24 +05:30
ADmad
1612bdf250 Fix docblock 2012-12-20 01:54:09 +05:30
ADmad
4fe85fc3c5 Fix docblock 2012-12-20 01:22:09 +05:30
Mark Story
408f9dd3b0 Merge pull request #1018 from dereuromark/2.3-postlink-target
Put target attr on correct element when using postLink()
2012-12-15 06:58:14 -08:00
mark_story
6f5ff4d7dd Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
2012-12-13 20:20:42 -05:00
euromark
ae7f629eff correct target attribute for postLinks 2012-12-12 11:23:41 +01:00
Ceeram
2d908885c8 adding short descriptions in docblock 2012-12-10 10:55:22 +01:00
Ceeram
a15481bbe9 starting refactor Form->input 2012-12-10 10:51:39 +01:00
mark_story
2a8ebcea60 Exclude value attribute from generated file inputs.
Having a value attribute present causes HTML validation errors in HTML5
doctypes. It has no effect in other doctypes, and excluding it is always
valid.

Fixes #3440
2012-12-09 13:31:01 -05:00
mark_story
8a77a31620 Set translations to use the cake domain.
Core classes should be using either the cake, or cake_dev domain.

Fixes #3443
2012-12-09 13:25:00 -05:00
José Lorenzo Rodríguez
dc370826af Merge pull request #918 from bar/2.3-form-empty-error
Calling Form->input() with 'errorMessage'=> false should trigger field error, but not render error element.
2012-12-01 13:09:35 -08:00
Ber Clausen
1c281c9a2b Calling Form->input() with 'errorMessage'=>false should trigger field
error, but not render error message (HTML element).
2012-11-16 15:02:01 -03:00
ADmad
f7e66da6fc Fix derpness of fieldset and legend options being mashed inside $fields param array. 2012-11-15 11:22:04 +05:30
mark_story
a7f192c606 Merge branch 'master' into 2.3 2012-11-14 21:50:29 -05:00
mark_story
58de6702bc Fix notice errors when creating fields named 0.
Fixes #3371
2012-11-14 21:27:12 -05:00
mark_story
60f9626838 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-02 16:52:51 -04:00
ADmad
26d8351af4 Fixing "required" field detection again. Closes #3305 2012-11-01 05:04:37 +05:30
mark_story
c24bec679b Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/View/Helper/FormHelper.php
2012-10-27 21:13:53 -04:00
ADmad
0ddd130833 Improved "required" field detection. Closes #3305. 2012-10-26 12:58:24 +05:30
mark_story
50a4b792be Clean up code in FormHelper::dateTime()
Remove $$ variables and split a huge method into smaller pieces.
2012-10-25 21:28:01 -04:00
mark_story
c359e4b689 Fix issue with array based values and interval.
Fixes #3299
2012-10-25 20:46:54 -04:00
Mark Story
555bfc32ea Merge pull request #909 from dereuromark/master-magic-input-bc
Master magic input bc

Fixes #3295
2012-10-25 07:05:31 -07:00
dogmatic69
641ba9f3e6 Merge branch '2.3' into type-checks
Conflicts:
	lib/Cake/Error/ExceptionRenderer.php
	lib/Cake/Routing/Dispatcher.php
2012-10-24 19:03:44 +01:00
mark_story
d2010308d4 Merge branch 'master' into 2.3 2012-10-23 20:20:52 -04:00
euromark
2ac08bf024 fix whitespace 2012-10-23 19:04:52 +02:00
mark_story
3729ac1f2f Fix issue where the incorrect meridian would be selected.
When combining 12 hour format, interval and afternoon times, the
incorrect meridian would be selected.  Moving the hour math into
FormHelper::hour() makes that method generally more correct and lenient
on its input.

Fixes #3299
2012-10-23 12:47:12 -04:00
euromark
5064601c6f adding test case 2012-10-23 15:11:23 +02:00
euromark
9a9ac6f3a7 allow input type=number to also be magic 2012-10-23 15:11:22 +02:00