summaryrefslogtreecommitdiff
path: root/rt/share/html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-05-27 15:20:05 -0700
committerIvan Kohler <ivan@freeside.biz>2014-05-27 15:20:05 -0700
commitc5922713bc199600bc8c203155a4016c9d24cbbc (patch)
tree1b9ec8323fdab801c4ca6aaf74234bfe8f74c56c /rt/share/html
parent7c841dec307feed06ee532ac18e4114ef68243a8 (diff)
rt 4.0.20 (RT#13852)
Diffstat (limited to 'rt/share/html')
-rw-r--r--rt/share/html/Dashboards/Queries.html2
-rw-r--r--rt/share/html/Elements/CollectionAsTable/ParseFormat3
-rw-r--r--rt/share/html/Elements/EditCustomFieldAutocomplete9
-rw-r--r--rt/share/html/Elements/EditCustomFieldDateTime3
-rw-r--r--rt/share/html/Elements/EditCustomFieldFreeform15
-rw-r--r--rt/share/html/Elements/EditCustomFieldSelect4
-rw-r--r--rt/share/html/Elements/EditCustomFieldText18
-rw-r--r--rt/share/html/Elements/EditCustomFieldWikitext18
-rw-r--r--rt/share/html/Elements/MakeClicky48
-rw-r--r--rt/share/html/Elements/MyRT8
-rw-r--r--rt/share/html/Elements/ShowLink2
-rwxr-xr-xrt/share/html/Elements/SimpleSearch3
-rw-r--r--rt/share/html/Install/DatabaseDetails.html1
-rw-r--r--rt/share/html/NoAuth/js/cascaded.js4
-rw-r--r--rt/share/html/Prefs/MyRT.html20
-rw-r--r--rt/share/html/Prefs/Search.html15
-rwxr-xr-xrt/share/html/Search/Bulk.html29
-rw-r--r--rt/share/html/Search/Chart2
-rw-r--r--rt/share/html/Search/Chart.html2
-rw-r--r--rt/share/html/Search/Elements/BuildFormatString10
-rw-r--r--rt/share/html/Search/Elements/Chart2
-rwxr-xr-xrt/share/html/Search/Results.html4
22 files changed, 145 insertions, 77 deletions
diff --git a/rt/share/html/Dashboards/Queries.html b/rt/share/html/Dashboards/Queries.html
index 61f6195e5..c489f1c18 100644
--- a/rt/share/html/Dashboards/Queries.html
+++ b/rt/share/html/Dashboards/Queries.html
@@ -190,7 +190,7 @@ $m->callback(
);
my @panes;
-for my $pane (keys %pane_name) {
+for my $pane (sort keys %pane_name) {
my $sel = $m->comp(
'/Widgets/SelectionBox:new',
Action => 'Queries.html',
diff --git a/rt/share/html/Elements/CollectionAsTable/ParseFormat b/rt/share/html/Elements/CollectionAsTable/ParseFormat
index e56e9ce0f..5d55ffbeb 100644
--- a/rt/share/html/Elements/CollectionAsTable/ParseFormat
+++ b/rt/share/html/Elements/CollectionAsTable/ParseFormat
@@ -55,6 +55,7 @@ my @Columns;
while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
my $col = $1;
+ my $colref = { original_string => $col };
if ($col =~ /^$RE{quoted}$/o) {
substr($col,0,1) = "";
@@ -62,8 +63,6 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
$col =~ s/\\(.)/$1/g;
}
- my $colref = { };
-
$m->callback(CallbackName => 'PreColumn', Column => $colref, col => \$col);
while ( $col =~ s{/(STYLE|CLASS|TITLE|ALIGN|SPAN|ATTRIBUTE):([^/]*)}{}i ) {
diff --git a/rt/share/html/Elements/EditCustomFieldAutocomplete b/rt/share/html/Elements/EditCustomFieldAutocomplete
index 7bfe91114..8eb7b427a 100644
--- a/rt/share/html/Elements/EditCustomFieldAutocomplete
+++ b/rt/share/html/Elements/EditCustomFieldAutocomplete
@@ -46,7 +46,14 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ( $Multiple ) {
-<textarea cols="<% $Cols %>" rows="<% $Rows %>" name="<% $name %>-Values" id="<% $name %>-Values" class="CF-<%$CustomField->id%>-Edit"><% $Default || '' %></textarea>
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<% $name %>-Values" id="<% $name %>-Values" class="CF-<%$CustomField->id%>-Edit"><% $Default || '' %></textarea>
<script type="text/javascript">
var id = <% "$name-Values" |n,j%>;
diff --git a/rt/share/html/Elements/EditCustomFieldDateTime b/rt/share/html/Elements/EditCustomFieldDateTime
index 25d1ce160..edf125e80 100644
--- a/rt/share/html/Elements/EditCustomFieldDateTime
+++ b/rt/share/html/Elements/EditCustomFieldDateTime
@@ -50,7 +50,7 @@
<%INIT>
my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
-$DateObj->Set( Format => 'ISO', Value => $Default );
+$DateObj->Set( Format => $Format, Value => $Default );
</%INIT>
<%ARGS>
$Object => undef
@@ -59,4 +59,5 @@ $NamePrefix => undef
$Default => undef
$Values => undef
$MaxValues => 1
+$Format => 'ISO'
</%ARGS>
diff --git a/rt/share/html/Elements/EditCustomFieldFreeform b/rt/share/html/Elements/EditCustomFieldFreeform
index 67248738b..f0f8ee6de 100644
--- a/rt/share/html/Elements/EditCustomFieldFreeform
+++ b/rt/share/html/Elements/EditCustomFieldFreeform
@@ -47,9 +47,20 @@
%# END BPS TAGGED BLOCK }}}
% my $name = $NamePrefix . $CustomField->Id . '-Value';
% if ($Multiple) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" wrap="off" class="CF-<%$CustomField->id%>-Edit"><% defined($Default) ? $Default : '' %></textarea>
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<%$name%>s" id="<%$name%>s" wrap="off" class="CF-<%$CustomField->id%>-Edit"><% defined($Default) ? $Default : '' %></textarea>
% } else {
-<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" class="CF-<%$CustomField->id%>-Edit" value="<% defined($Default) ? $Default : ''%>" />
+<input type="text" name="<%$name%>" id="<%$name%>" \
+% if ( defined $Cols ) {
+size="<% $Cols %>" \
+% }
+class="CF-<%$CustomField->id%>-Edit" value="<% defined($Default) ? $Default : ''%>" />
% }
<%INIT>
if ( $Multiple and $Values ) {
diff --git a/rt/share/html/Elements/EditCustomFieldSelect b/rt/share/html/Elements/EditCustomFieldSelect
index 87400ab2e..b343d8266 100644
--- a/rt/share/html/Elements/EditCustomFieldSelect
+++ b/rt/share/html/Elements/EditCustomFieldSelect
@@ -104,7 +104,7 @@ jQuery( function () {
% if ( $RenderType eq 'List' ) {
<fieldset class="cfedit">
-<div name="<%$id%>-Values" id="<%$id%>-Values">
+<div data-name="<%$id%>-Values" id="<%$id%>-Values">
% if ( $checktype eq 'radio' ) {
<div class="none">
<input class="none" type="<% $checktype %>" name="<% $name %>" id="<% $name %>-none" value="" <% keys %default ? '' : ' checked="checked"' |n%> />
@@ -115,7 +115,7 @@ jQuery( function () {
% while ( my $value = $CFVs->Next ) {
% my $content = $value->Name;
% my $labelid = "$name-". $value->id;
-<div name="<% $value->Category %>">
+<div data-name="<% $value->Category || '' %>">
<input type="<% $checktype %>" name="<% $name %>" id="<% $labelid %>" value="<% $content %>" <% $default{ lc $content }? ' checked="checked"' : '' |n%> />
<label for="<% $labelid %>"><% $content %></label><br />
</div>
diff --git a/rt/share/html/Elements/EditCustomFieldText b/rt/share/html/Elements/EditCustomFieldText
index 866460472..ca7a266c3 100644
--- a/rt/share/html/Elements/EditCustomFieldText
+++ b/rt/share/html/Elements/EditCustomFieldText
@@ -46,10 +46,24 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $value->Content %></textarea><br />
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% defined($Default) ? $Default : '' %></textarea>
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% defined($Default) ? $Default : '' %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/share/html/Elements/EditCustomFieldWikitext b/rt/share/html/Elements/EditCustomFieldWikitext
index 1a36ae333..d4b79cd38 100644
--- a/rt/share/html/Elements/EditCustomFieldWikitext
+++ b/rt/share/html/Elements/EditCustomFieldWikitext
@@ -46,10 +46,24 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $value->Content %></textarea><br />
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $Default %></textarea>
+<textarea \
+% if ( defined $Cols ) {
+cols="<% $Cols %>" \
+% }
+% if ( defined $Rows ) {
+rows="<% $Rows %>" \
+% }
+name="<%$NamePrefix%><%$CustomField->Id%>-Values" class="CF-<%$CustomField->id%>-Edit"><% $Default %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/share/html/Elements/MakeClicky b/rt/share/html/Elements/MakeClicky
index e22e75fbb..8efe78c4a 100644
--- a/rt/share/html/Elements/MakeClicky
+++ b/rt/share/html/Elements/MakeClicky
@@ -96,6 +96,8 @@ my $handle = sub {
}
};
+my $cache; # only defined via callback
+
# Hook to add more Clicky types
# XXX Have to have Page argument, as Mason gets caller wrong in Callback?
# This happens as we are in <%ONCE> block
@@ -104,6 +106,7 @@ $m->callback(
types => \@types,
actions => \%actions,
handle => \$handle,
+ cache => \$cache,
);
@@ -131,6 +134,15 @@ $html => undef
</%ARGS>
<%INIT>
return unless defined $$content;
+if ( defined $cache ) {
+ my $cached_content = $cache->(fetch => $content);
+ if ( $cached_content ) {
+ RT->Logger->debug("Found MakeClicky cache");
+ $$content = $cached_content;
+ return;
+ }
+}
+
unless ( $regexp ) {
RT::Interface::Web::EscapeUTF8( $content ) unless $html;
return;
@@ -165,40 +177,6 @@ substr( $$content, $pos ) = $escaper->( substr( $$content, $pos ) ) unless
($pos == length $$content) || $html;
pos($$content) = 0;
+$cache->(store => $content) if defined $cache;
</%INIT>
-<%doc>
-
-MakeClicky detects various formats of data in headers and email
-messages, and extends them with supporting links. By default, RT
-provides two formats:
-
- * 'httpurl': detects http:// and https:// URLs and adds '[Open URL]'
- link after the URL.
-
- * 'httpurl_overwrite': also detects URLs as 'httpurl' format, but
- replace URL with link.
-
-To extend this with your own types of data, use the callback.
-It will be provided with:
-
- * 'types': An array reference of hash references. Modify this array
- reference to add your own types; the first matching type will be
- used. Each hashref should contain:
- - 'name': The name of the data format; this is used in the
- configuration file to enable the format.
- - 'regex': A regular expression to match against
- - 'action': The name of the action to run (see "actions", below)
-
- * 'actions': A hash reference of 'actions'. Modify this hash
- reference to change or add action types. Values are subroutine
- references which will get called when needed. They should return
- the modified string. Note that subroutine must escape HTML.
-
- * 'handler': A reference to a subroutine reference; modify it if you
- have to. This can be used to add pre- or post-processing around
- all actions.
-
-Read more about writing new actions in docs/extending/clickable_links.pod
-
-</%doc>
diff --git a/rt/share/html/Elements/MyRT b/rt/share/html/Elements/MyRT
index c59ec1c32..84db949f7 100644
--- a/rt/share/html/Elements/MyRT
+++ b/rt/share/html/Elements/MyRT
@@ -67,12 +67,10 @@
my %allowed_components = map {$_ => 1} @{RT->Config->Get('HomepageComponents')};
my $user = $session{'CurrentUser'}->UserObj;
-$Portlets ||= $session{'my_rt_portlets'};
+$Portlets ||= $user->Preferences('HomepageSettings');
unless ( $Portlets ) {
- my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
- $Portlets = $session{'my_rt_portlets'} = $user->Preferences(
- HomepageSettings => $default_portlets? $default_portlets->Content: {},
- );
+ my ($defaults) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+ $Portlets = $defaults ? $defaults->Content : {};
}
$m->callback( CallbackName => 'MassagePortlets', Portlets => $Portlets );
diff --git a/rt/share/html/Elements/ShowLink b/rt/share/html/Elements/ShowLink
index cccc3d824..35b26381a 100644
--- a/rt/share/html/Elements/ShowLink
+++ b/rt/share/html/Elements/ShowLink
@@ -49,7 +49,7 @@
% if ($URI->IsLocal) {
% my $member = $URI->Object;
% my $has_name = UNIVERSAL::can($member, 'Name') || (UNIVERSAL::can($member, '_Accessible') && $member->_Accessible('Name', 'read'));
-% if (UNIVERSAL::isa($member, "RT::Ticket")) {
+% if (UNIVERSAL::isa($member, "RT::Ticket") and $member->CurrentUserHasRight('ShowTicket')) {
% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
<span class="<% $inactive ? 'ticket-inactive' : '' %>">
diff --git a/rt/share/html/Elements/SimpleSearch b/rt/share/html/Elements/SimpleSearch
index bd8a87642..d9f34fa07 100755
--- a/rt/share/html/Elements/SimpleSearch
+++ b/rt/share/html/Elements/SimpleSearch
@@ -46,8 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" id="simple-search">
- <input size="12" name="q" autocomplete="off" accesskey="0" class="field" value="<&|/l&>Search</&>..." onfocus="if (this.value=='<&|/l&>Search</&>...') this.value=''" />
+ <input size="12" name="q" autocomplete="off" accesskey="0" class="field" value="<% $Placeholder %>..." onfocus="if (this.value==(<% $Placeholder, |n,j %>+'...')) this.value=''" />
</form>
<%ARGS>
$SendTo => '/Search/Simple.html'
+$Placeholder => loc('Search')
</%ARGS>
diff --git a/rt/share/html/Install/DatabaseDetails.html b/rt/share/html/Install/DatabaseDetails.html
index 78672db5c..b4d3f8c8a 100644
--- a/rt/share/html/Install/DatabaseDetails.html
+++ b/rt/share/html/Install/DatabaseDetails.html
@@ -165,6 +165,7 @@ if ( $Run ) {
);
my $sth = $dbh->prepare('select * from Users');
+ $sth->execute();
};
unless ( $@ ) {
diff --git a/rt/share/html/NoAuth/js/cascaded.js b/rt/share/html/NoAuth/js/cascaded.js
index b72a33f67..1611fd192 100644
--- a/rt/share/html/NoAuth/js/cascaded.js
+++ b/rt/share/html/NoAuth/js/cascaded.js
@@ -64,10 +64,10 @@ function filter_cascade (id, vals) {
}
else {
jQuery(element).find('div').hide().find('input').attr('disabled', 'disabled');
- jQuery(element).find('div[name=]').show().find('input').attr('disabled', '');
+ jQuery(element).find('div[data-name=]').show().find('input').attr('disabled', '');
jQuery(element).find('div.none').show().find('input').attr('disabled','');
for ( var j = 0; j < vals.length; j++ ) {
- jQuery(element).find('div[name^=' + vals[j] + ']').show().find('input').attr('disabled', '');
+ jQuery(element).find('div[data-name^=' + vals[j] + ']').show().find('input').attr('disabled', '');
}
}
}
diff --git a/rt/share/html/Prefs/MyRT.html b/rt/share/html/Prefs/MyRT.html
index a595ccf78..288df0b9a 100644
--- a/rt/share/html/Prefs/MyRT.html
+++ b/rt/share/html/Prefs/MyRT.html
@@ -97,18 +97,19 @@ if ( $ARGS{'UpdateSummaryRows'} ) {
$ARGS{'SummaryRows'} ||= $user->Preferences('SummaryRows', RT->Config->Get('DefaultSummaryRows'));
if ($ARGS{Reset}) {
- my ($ok, $msg) = $user->SetPreferences('HomepageSettings', {});
- push @results, $ok ? loc('Preferences saved.') : $msg;
- delete $session{'my_rt_portlets'};
+ for my $pref_name ('HomepageSettings', 'SummaryRows') {
+ next unless $user->Preferences($pref_name);
+ my ($ok, $msg) = $user->DeletePreferences($pref_name);
+ push @results, $msg unless $ok;
+ }
+ push @results, loc('Preferences saved.') unless @results;
}
-unless (exists $session{'my_rt_portlets'}) {
- my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
- my $portlets = $default_portlets ? $default_portlets->Content : {};
-
- $session{'my_rt_portlets'} = $user->Preferences('HomepageSettings', $portlets);
+my $portlets = $user->Preferences('HomepageSettings');
+unless ($portlets) {
+ my ($defaults) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+ $portlets = $defaults ? $defaults->Content : {};
}
-my $portlets = $session{'my_rt_portlets'};
my %seen;
my @items = map ["component-$_", loc($_)], grep !$seen{$_}++, @{RT->Config->Get('HomepageComponents')};
@@ -157,7 +158,6 @@ my @panes = $m->comp(
my ( $conf, $pane ) = @_;
my ($ok, $msg) = $user->SetPreferences( 'HomepageSettings', $conf );
push @results, $ok ? loc('Preferences saved for [_1].', $pane) : $msg;
- delete $session{'my_rt_portlets'};
}
);
diff --git a/rt/share/html/Prefs/Search.html b/rt/share/html/Prefs/Search.html
index bb52a6212..3f2c404cf 100644
--- a/rt/share/html/Prefs/Search.html
+++ b/rt/share/html/Prefs/Search.html
@@ -68,6 +68,14 @@
</form>
+<&|/Widgets/TitleBox, title => loc("Reset") &>
+<form method="post" name="ResetSearchOptions" action="Search.html">
+<input type="hidden" name="Reset" value="1" />
+<input type="hidden" name="name" value="<%$ARGS{name}%>" class="hidden" />
+<input type="submit" class="button" name="ResetSearchOptions" value="<% loc('Reset to default') %>">
+</form>
+</&>
+
<%INIT>
my @actions;
my $title = loc("Customize").' ';
@@ -81,6 +89,13 @@ Abort('No search specified')
my $search = $class->new ($session{'CurrentUser'});
$search->LoadById ($id);
+
+# If we are resetting prefs, do so before attempting to load them
+if ($ARGS{'Reset'}) {
+ my ($ok, $msg) = $session{'CurrentUser'}->UserObj->DeletePreferences($ARGS{name});
+ push @actions, $ok ? loc('Preferences reset.') : $msg;
+}
+
$title .= loc (RT::SavedSearch->EscapeDescription($search->Description), loc ('"N"'));
my $user = $session{'CurrentUser'}->UserObj;
my $SearchArg = $user->Preferences($search, $search->Content);
diff --git a/rt/share/html/Search/Bulk.html b/rt/share/html/Search/Bulk.html
index a215eac8e..38ca64248 100755
--- a/rt/share/html/Search/Bulk.html
+++ b/rt/share/html/Search/Bulk.html
@@ -202,6 +202,13 @@ $cfs->LimitToQueue($_) for keys %$seen_queues;
% } elsif ($cf->Type eq 'Text') {
<td><& /Elements/EditCustomFieldText, @add &></td>
<td>&nbsp;</td>
+% } elsif ($cf->Type eq 'Date') {
+<td><& /Elements/EditCustomFieldDate, @add, Default => undef &></td>
+<td><& /Elements/EditCustomFieldDate, @del, Default => undef &></td>
+% } elsif ($cf->Type eq 'DateTime') {
+% # Pass datemanip format to prevent another tz date conversion
+<td><& /Elements/EditCustomFieldDateTime, @add, Default => undef, Format => 'datemanip' &></td>
+<td><& /Elements/EditCustomFieldDateTime, @del, Default => undef, Format => 'datemanip' &></td>
% } else {
% $RT::Logger->crit("Unknown CustomField type: " . $cf->Type);
% }
@@ -372,7 +379,27 @@ unless ( $ARGS{'AddMoreAttach'} ) {
unless ( $cf->SingleValue );
my $current_values = $Ticket->CustomFieldValues($cfid);
+
+ if ( $cf->Type eq 'DateTime' || $cf->Type eq 'Date' ){
+ # Clear out empty string submissions to avoid
+ # Not set changed to Not set
+ @values = grep length, @values;
+ }
+
foreach my $value (@values) {
+
+ # Convert for timezone. Without converstion,
+ # HasEntry and DeleteCustomFieldValue fail because
+ # the value in the DB is converted.
+ if ( $op eq 'del'
+ && ($cf->Type eq 'DateTime' || $cf->Type eq 'Date') ){
+ my $DateObj = RT::Date->new( $session{'CurrentUser'} );
+ $DateObj->Set( Format => 'unknown',
+ Value => $value );
+ $value = $cf->Type eq 'DateTime' ? $DateObj->ISO
+ : $DateObj->ISO(Time => 0, Seconds => 0);
+ }
+
if ( $op eq 'del' && $current_values->HasEntry($value) ) {
my ( $id, $msg ) = $Ticket->DeleteCustomFieldValue(
Field => $cfid,
@@ -411,6 +438,8 @@ unless ( $ARGS{'AddMoreAttach'} ) {
# Cleanup WebUI
delete $session{'Attachments'};
+
+ $Tickets->RedoSearch();
}
my $TxnCFs = RT::CustomFields->new( $session{CurrentUser} );
diff --git a/rt/share/html/Search/Chart b/rt/share/html/Search/Chart
index 4be28abd6..7256106e3 100644
--- a/rt/share/html/Search/Chart
+++ b/rt/share/html/Search/Chart
@@ -48,7 +48,7 @@
<%args>
$Query => "id > 0"
$PrimaryGroupBy => 'Queue'
-$ChartStyle => 'bars'
+$ChartStyle => 'bar'
</%args>
<%init>
my $chart_class;
diff --git a/rt/share/html/Search/Chart.html b/rt/share/html/Search/Chart.html
index 952f09cf4..ab25745f8 100644
--- a/rt/share/html/Search/Chart.html
+++ b/rt/share/html/Search/Chart.html
@@ -47,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<%args>
$PrimaryGroupBy => 'Queue'
-$ChartStyle => 'bars'
+$ChartStyle => 'bar'
$Description => undef
</%args>
<%init>
diff --git a/rt/share/html/Search/Elements/BuildFormatString b/rt/share/html/Search/Elements/BuildFormatString
index 14e3a7105..66fd14763 100644
--- a/rt/share/html/Search/Elements/BuildFormatString
+++ b/rt/share/html/Search/Elements/BuildFormatString
@@ -109,6 +109,8 @@ my @fields = (
)
); # loc_qw
+# This callback will only run once and will be removed in 4.4
+# If you want to add a new item to @fields, use the Default callback below.
$m->callback( CallbackOnce => 1, CallbackName => 'SetFieldsOnce', Fields => \@fields );
my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
@@ -227,17 +229,17 @@ my @format_string;
foreach my $field (@seen) {
next unless $field;
my $row = "";
- if ( $field->{'output'} ) {
- $row = join '', @{$field->{'output'}};
+ if ( $field->{'original_string'} ) {
+ $row = $field->{'original_string'};
}
else {
$row .= $field->{'Prefix'} if defined $field->{'Prefix'};
$row .= "__$field->{'Column'}__"
unless ( $field->{'Column'} eq "<blank>" );
$row .= $field->{'Suffix'} if defined $field->{'Suffix'};
+ $row =~ s!([\\'])!\\$1!g;
+ $row = "'$row'";
}
- $row =~ s!([\\'])!\\$1!g;
- $row = "'$row'";
push( @format_string, $row );
}
diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart
index 05a0422b1..f0d1e4a0f 100644
--- a/rt/share/html/Search/Elements/Chart
+++ b/rt/share/html/Search/Elements/Chart
@@ -48,7 +48,7 @@
<%args>
$Query => "id > 0"
$PrimaryGroupBy => 'Queue'
-$ChartStyle => 'bars'
+$ChartStyle => 'bar'
</%args>
<%init>
use RT::Report::Tickets;
diff --git a/rt/share/html/Search/Results.html b/rt/share/html/Search/Results.html
index 601786f10..3c3187c1f 100755
--- a/rt/share/html/Search/Results.html
+++ b/rt/share/html/Search/Results.html
@@ -111,7 +111,6 @@ if ( !defined($Rows) ) {
}
$Page = 1 unless $Page && $Page > 0;
-my ($title, $ticketcount);
$session{'i'}++;
$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
my ($ok, $msg) = $Query ? $session{'tickets'}->FromSQL($Query) : (1, "Vacuously OK");
@@ -141,11 +140,10 @@ $session{'CurrentSearchHash'} = {
};
+my ($title, $ticketcount) = (loc("Found tickets"), 0);
if ( $session{'tickets'}->Query()) {
$ticketcount = $session{tickets}->CountAll();
$title = loc('Found [quant,_1,ticket]', $ticketcount);
-} else {
- $title = loc("Find tickets");
}
my $QueryString = "?".$m->comp('/Elements/QueryString',