projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemd: start apache after postgresql
[freeside.git]
/
rt
/
share
/
html
/
Search
/
Elements
/
EditFormat
diff --git
a/rt/share/html/Search/Elements/EditFormat
b/rt/share/html/Search/Elements/EditFormat
index
c3491fc
..
9e2e11e
100644
(file)
--- a/
rt/share/html/Search/Elements/EditFormat
+++ b/
rt/share/html/Search/Elements/EditFormat
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
3
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
9
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-59,7
+59,8
@@
<td valign="top"><select size="6" name="SelectDisplayColumns" multiple="multiple">
% my %seen;
% foreach my $field ( grep !$seen{lc $_}++, @$AvailableColumns) {
<td valign="top"><select size="6" name="SelectDisplayColumns" multiple="multiple">
% my %seen;
% foreach my $field ( grep !$seen{lc $_}++, @$AvailableColumns) {
-<option value="<% $field %>"><% loc($field) %></option>
+<option value="<% $field %>" <% $selected{$field} ? 'selected="selected"' : '' |n%>>\
+<% $field =~ /^(?:CustomField|CF)\./ ? $field : loc($field) %></option>
% }
</select></td>
<td>
% }
</select></td>
<td>
@@
-105,8
+106,10
@@
<td valign="top">
<select size="4" name="CurrentDisplayColumns">
% my $i=0;
<td valign="top">
<select size="4" name="CurrentDisplayColumns">
% my $i=0;
+% my $current = $ARGS{CurrentDisplayColumns} || ''; $current =~ s/^\d+>//;
% foreach my $field ( @$CurrentFormat ) {
% foreach my $field ( @$CurrentFormat ) {
-<option value="<% $i++ %>><% $field->{Column} %>"><% loc( $field->{Column} ) %></option>
+<option value="<% $i++ %>><% $field->{Column} %>" <% $field->{Column} eq $current ? 'selected="selected"' : '' |n%>>\
+<% $field->{Column} =~ /^(?:CustomField|CF)\./ ? $field->{Column} : loc( $field->{Column} ) %></option>
% }
</select>
<br />
% }
</select>
<br />
@@
-120,6
+123,12
@@
</tr>
</table>
</tr>
</table>
+<%init>
+my $selected = $ARGS{SelectDisplayColumns};
+$selected = [ $selected ] unless ref $selected;
+my %selected;
+$selected{$_}++ for grep {defined} @{ $selected };
+</%init>
<%ARGS>
$CurrentFormat => undef
$AvailableColumns => undef
<%ARGS>
$CurrentFormat => undef
$AvailableColumns => undef