Author: david
Date: Mon Mar 26 11:44:41 2012
New Revision: 11275
Log:
Include rendered InputMany inputs in form parameters, even if blank, like r3497
. Fixes issue 2298.
Modified:
trunk/lib/QubitWidgetFormInputMany.php
Modified: trunk/lib/QubitWidgetFormInputMany.php
==============================================================================
--- trunk/lib/QubitWidgetFormInputMany.php Mon Mar 26 10:26:32 2012
(r11274)
+++ trunk/lib/QubitWidgetFormInputMany.php Mon Mar 26 11:44:41 2012
(r11275)
@@ -63,6 +63,9 @@
$defaults = $defaults->call();
}
+ // http://trac.symfony-project.org/ticket/7208
+ $null = $this->renderTag('input', array('name' => $name, 'type' =>
'hidden'));
+
if (is_array($defaults) && 0 < count($defaults))
{
$inputStr .= '<ul class="multiInput" id="'.$name."\">\n";
@@ -83,8 +86,10 @@
}
$attributes['class'] = (isset($attributes['class'])) ?
$attributes['class'] + ' multiInput' : 'multiInput';
- $inputStr .= $this->renderTag('input', array_merge(array('name' =>
$name.'[new]', 'type' => $this->getOption('type')), $attributes));
- return $inputStr;
+ // Add a new value
+ $new = $this->renderTag('input', array_merge(array('name' =>
$name.'[new]', 'type' => $this->getOption('type')), $attributes));
+
+ return $null.$inputStr.$new;
}
}
--
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.com/group/qubit-commits?hl=en.