diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig index 3ab047c494ad8..780cd695e6c15 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig @@ -93,7 +93,7 @@ {{ block('choice_widget_options') }} {% else %} - + {% endif %} {% endfor %} {% endspaceless %} diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php index a7a9311d51326..e4d53e6b1d829 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php @@ -6,6 +6,6 @@ block($form, 'choice_widget_options', array('choices' => $choice)) ?> - + diff --git a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php index 97cdd214c28f8..aef612dc7aae0 100644 --- a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php +++ b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php @@ -39,17 +39,26 @@ class ChoiceView */ public $label; + /** + * Is choice disabled. + * + * @var Boolean + */ + public $disabled; + /** * Creates a new ChoiceView. * * @param mixed $data The original choice. * @param string $value The view representation of the choice. * @param string $label The label displayed to humans. + * @param string $disabled Is choice disabled. */ - public function __construct($data, $value, $label) + public function __construct($data, $value, $label, $disabled = false) { $this->data = $data; $this->value = $value; $this->label = $label; + $this->disabled = $disabled; } }