Skip to content

Radio buttons don't check if bound to subdocument #668

Closed
wants to merge 1 commit into from

3 participants

@giacmir
giacmir commented Oct 24, 2012

As in the object I noticed that if a radio button set is bound to a subdocument using a dot notation (e.g. person.name) it doesn't checks.

This happens because the $name variable passed is changed before the value check and so it always fails.

@nateabele
Union of RAD member

Thanks for the fix! We accept pull requests against the dev branch, and will merge it once it has an accompanying test case that proves the issue. You can refer to our contributor guide for more information: http://lithify.me/docs/manual/appendices/contributing.wiki

@ericcholis

Since this has been floating for a little while, I'd be happy to re-submit against the latest dev and write tests.

Any thoughts on where to place the tests? I figured I it would be best to just extend:

lithium\tests\cases\template\helper\FormTest->testRadioGeneration();
lithium\tests\cases\template\helper\FormTest->testCustomRadio();
lithium\tests\cases\template\helper\FormTest->testCustomValueRadio();

to account for dot-notation names. Thought I would check first.

@nateabele
Union of RAD member

@ericcholis That would be most appreciated, thanks. Extending those existing tests sounds fine.

@ericcholis

All set, opened a new issue #815

@nateabele
Union of RAD member

Closing in favor of #815. Thanks @ericcholis.

@nateabele nateabele closed this Feb 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.