Author: jablko
Date: Thu Sep 24 11:13:32 2009
New Revision: 3497
Log:
Include rendered <select multiple="multiple"> inputs in submitted parameters,
even if no options selected, http://trac.symfony-project.org/ticket/7208, fixes
issue 895
Modified:
trunk/lib/vendor/symfony/lib/widget/sfWidgetFormSelect.class.php
Modified: trunk/lib/vendor/symfony/lib/widget/sfWidgetFormSelect.class.php
==============================================================================
--- trunk/lib/vendor/symfony/lib/widget/sfWidgetFormSelect.class.php Thu Sep
24 11:10:00 2009 (r3496)
+++ trunk/lib/vendor/symfony/lib/widget/sfWidgetFormSelect.class.php Thu Sep
24 11:13:32 2009 (r3497)
@@ -49,8 +49,11 @@
*/
public function render($name, $value = null, $attributes = array(), $errors
= array())
{
+ $null = null;
if ($this->getOption('multiple'))
{
+ $null = $this->renderTag('input', array('name' => $name, 'type' =>
'hidden'));
+
$attributes['multiple'] = 'multiple';
if ('[]' != substr($name, -2))
@@ -65,7 +68,7 @@
$choices = $choices->call();
}
- return $this->renderContentTag('select', "\n".implode("\n",
$this->getOptionsForSelect($value, $choices))."\n", array_merge(array('name' =>
$name), $attributes));
+ return $null.$this->renderContentTag('select', "\n".implode("\n",
$this->getOptionsForSelect($value, $choices))."\n", array_merge(array('name' =>
$name), $attributes));
}
/**
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---