Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix radio & multicheckbox disable #4160

Closed
wants to merge 1 commit into from

Conversation

Chintanvpatel
Copy link
Contributor

Please refer this issue.
#4136

@grizzm0
Copy link
Contributor

grizzm0 commented Apr 1, 2013

This wasn't the way I told you to fix it tho. I don't know in which case $optionSpec['disabled'] is set, but the code is probably there for a reason. This PR makes that if-statement useless.

@@ -258,7 +258,6 @@ protected function renderOptions(MultiCheckboxElement $element, array $options,
$value = '';
$label = '';
$selected = false;
$disabled = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this back in, move it down to row 264 and change false to isset($inputAttributes['disabled']) ? true : false

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only testing isset() is wrong, is the "disabled" option could be set to false and isset() would return true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know when "Disabled" will come in $options array. Because "Disable" is actually Attribute of form element.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah. That's true. Does anyone know when and how $optionSpec['disabled'] is used? Sounds like the idea is that you'll be able to disable just a single radio instead of all of them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants