[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.3-83-ga3929ed
Alex Vandiver
alexmv at bestpractical.com
Wed Apr 9 18:18:23 EDT 2014
The branch, 4.2-trunk has been updated
via a3929ed5687c2a23c214b742cd614d6e0a63e691 (commit)
from d3ab184631b80d0e039070876de956419649eb60 (commit)
Summary of changes:
share/html/Widgets/Form/Select | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit a3929ed5687c2a23c214b742cd614d6e0a63e691
Author: Espen Wiborg <Espen.Wiborg at telio.no>
Date: Wed Apr 9 18:15:46 2014 -0400
Make Widgets/Form/Select honor Multiple
Even if you set Multiple => 1, you still get a dropdown. Also ensure
that the "default"/empty value is selected if no CurrentValue is set;
this becomes much more visible with the multiple-select listbox.
Resolves I#12447.
diff --git a/share/html/Widgets/Form/Select b/share/html/Widgets/Form/Select
index 08a7bda..903fa9b 100644
--- a/share/html/Widgets/Form/Select
+++ b/share/html/Widgets/Form/Select
@@ -80,11 +80,11 @@ $AlternativeLabel => loc('other...'),
$Multiple => 0,
</%ARGS>
-<select name="<% $Name %>">
+<select name="<% $Name %>" <% $Multiple ? 'multiple="multiple"' : '' |n%>>
% if ( $Default ) {
% my $selected = '';
-% $selected = 'selected="selected"' unless @CurrentValue;
+% $selected = 'selected="selected"' unless $CurrentValue[0];
<option value="__empty_value__" <% $selected |n %>><% $DefaultLabel %></option>
% }
-----------------------------------------------------------------------
More information about the rt-commit
mailing list