Update checkbox/radio for configurable enclosed option. #1397

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
1 participant
@kartik-v
Contributor

kartik-v commented Dec 2, 2013

The BaseHtml checkbox and radio implementation hard-codes a container to envelop the input when label is passed. For example: <div class="checkbox"> or <div class="radio">. This should be configurable. The current Pull Request allows the container enclosure to be optional by including an hasContainer option.This is set to true by default so current implementation is not affected. But it also allows this to be set to false for some scenarios. For example, the false option is very useful for generating inline checkbox lists or inline radio lists, where the enclosure is not required.

kartik-v added some commits Dec 2, 2013

Update checkbox/radio for configurable enclosed option.
The BaseHtml checkbox and radio implementation hard-codes a container to envelop the input when label is passed. For example: ```<div class="checkbox">``` or ```<div class="radio">```. This should be configurable. The current Pull Request allows the container enclosure to be optional by including an ```isEnclosed``` option.This is set to true by default. But it requires to be false for some scenarios. For example, the false option is very useful for generating inline checkbox lists or inline radio lists, where the enclosure is not required.
Updated checkbox/radio for enclosed Container - code edits
Updated ```isEnclosed``` to ```hasContainer``` - since there is an enclosed label somewhere (not to confuse). Also added unsetting of this variable in the ```options``` array after reading the value.

@qiangxue qiangxue closed this in 8362385 Dec 2, 2013

@kartik-v kartik-v deleted the kartik-v:patch-6 branch Apr 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment