[Rt-commit] rt branch, 4.0/fix-radio-button-checked, created. rt-4.0.12-31-g4b059b4
? sunnavy
sunnavy at bestpractical.com
Wed May 22 12:04:56 EDT 2013
The branch, 4.0/fix-radio-button-checked has been created
at 4b059b45e3efc0efc6fbf4f49825bb54238ff4f1 (commit)
- Log -----------------------------------------------------------------
commit 4b059b45e3efc0efc6fbf4f49825bb54238ff4f1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 22 23:18:45 2013 +0800
request args to determine if RadioButton should be "checked" could be an array
in rtir, launch investigation from an incident, if there is something wrong
when creating the investigation, the previous checked incident will be
unchecked. this is because the args submitted has multiple "Incident"
values(besides the radio, there is also an input with the same name), which
makes $DECODED_ARGS->{Incident} an array
see also #24156
diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index ac65459..e36c469 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -161,7 +161,11 @@ my $COLUMN_MAP = {
my $name = $_[2] || 'SelectedTicket';
my $arg = $DECODED_ARGS->{ $name };
my $checked = '';
- $checked = 'checked="checked"' if $arg && $arg == $id;
+ $checked = 'checked="checked"'
+ if $arg
+ && ( ref $arg eq 'ARRAY'
+ ? grep { $_ && $_ == $id } @$arg
+ : $arg == $id );
return \qq{<input type="radio" name="}, $name, \qq{" value="$id" $checked />};
},
},
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list