8000 [Form] Added right HTML types to Datetime/Date/Time types if single_text is true by willdurand · Pull Request #4204 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Added right HTML types to Datetime/Date/Time types if single_text is true #4204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 14, 2012
Merged

[Form] Added right HTML types to Datetime/Date/Time types if single_text is true #4204

merged 4 commits into from
May 14, 2012

Conversation

willdurand
Copy link
Contributor

When you set the widget option to single_text, you get a HTML input tag which is fine, but you the type is text, and it's wrong. You don't have any other way to get the right type as this attribute is defined to the FormView instance itself (see FileType for instance).

This PR adds right HTML types like the FileType does.

Cheers,
William

@willdurand
Copy link
Contributor Author

@fabpot anything else to do there?

@fabpot
Copy link
Member
fabpot commented May 11, 2012

adding some unit tests?

@willdurand
Copy link
Contributor Author

fair point :)

@travisbot
Copy link

This pull request fails (merged 2631c8b7 into cb905c5).

@travisbot
Copy link

This pull request passes (merged ceb5ce6 into e193452).

@willdurand
Copy link
Contributor Author

@fabpot ok, so I had to fix some other tests but there is a weird dependency between the tests in TwigBridge, and the Form component. I fixed the test suite's setup in the TwigBridge, and fixed some failing tests.

fabpot added a commit that referenced this pull request May 14, 2012
Commits
-------

ceb5ce6 [Form] fixed tests
a1e3a59 [TwigBridge] Switched to composer
df36afb [Form] Added tests
6d5ad3b [Form] Added right HTML types to Datetime/Date/Time types if single_text is true

Discussion
----------

[Form] Added right HTML types to Datetime/Date/Time types if single_text is true

When you set the `widget` option to `single_text`, you get a HTML input tag which is fine, but you the type is `text`, and it's wrong. You don't have any other way to get the right `type` as this attribute is defined to the FormView instance itself (see FileType for instance).

This PR adds right HTML types like the FileType does.

Cheers,
William

---------------------------------------------------------------------------

by willdurand at 2012-05-09T16:04:16Z

@fabpot anything else to do there?

---------------------------------------------------------------------------

by fabpot at 2012-05-11T16:28:43Z

adding some unit tests?

---------------------------------------------------------------------------

by willdurand at 2012-05-11T16:35:40Z

fair point :)

---------------------------------------------------------------------------

by travisbot at 2012-05-12T16:34:43Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1314731) (merged 2631c8b7 into cb905c5).

---------------------------------------------------------------------------

by travisbot at 2012-05-12T17:14:12Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1314902) (merged ceb5ce6 into e193452).

---------------------------------------------------------------------------

by willdurand at 2012-05-12T17:16:17Z

@fabpot ok, so I had to fix some other tests but there is a weird dependency between the tests in TwigBridge, and the Form component. I fixed the test suite's setup in the TwigBridge, and fixed some failing tests.
@fabpot fabpot merged commit ceb5ce6 into symfony:master May 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0