import rt 3.8.11
[freeside.git] / rt / html / Search / Simple.html
index cdffc4c..c531bd1 100644 (file)
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC 
 %#                                          <jesse@bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
 %# along with this program; if not, write to the Free Software
 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 %# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 %# 
 %# 
 %# CONTRIBUTION SUBMISSION POLICY:
     Title => $title
 &>
 
+<& /Elements/Callback, _CallbackName => 'PreForm', %ARGS &>
+
 <div id="SimpleSearchForm">
 <form action="Simple.html" method="get">
 
-<p><&|/l&>Search for tickets. Enter <strong>id</strong> numbers, <strong>queues</strong> by name, Owners by <strong>username</strong> and Requestors by <strong>email address</strong>. RT will look for anything else you enter in ticket bodies and attachments.</&></p>
+<p><&|/l&>Search for tickets. Enter <strong>id</strong> numbers, <strong>queues</strong> by name, Owners by <strong>username</strong> and Requestors by <strong>email address</strong>.</&></p>
 
 <p><&|/l&>Searching the full text of every ticket can take a long time, but if you need to do it, you can search for any word in full ticket history for any word by typing <b>fulltext:<i>word</i></b>.</&></p>
 <p><&|/l&>RT will look for anything else you enter in ticket subjects.</&></p>
 <div align="center">
 <input name="q" size="60" /><input type="submit" class="button" value="<&|/l&>Search</&>" />
 </div>
+
+</form>
+
+<& /Elements/Callback, _CallbackName => 'PostForm', %ARGS &>
+
 </div>
 
 <%INIT>
@@ -78,8 +85,15 @@ if ($q) {
     if ($q =~ /^(\d+)$/) {
         RT::Interface::Web::Redirect($RT::WebURL."/Ticket/Display.html?id=".$q);
     }
-    my $search  = RT::Search::Googleish->new(Argument   => $q,
-                                             TicketsObj => $tickets);
+
+    my %args = (
+        Argument   => $q,
+        TicketsObj => $tickets,
+    );
+
+    $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'SearchArgs', args => \%args);
+
+    my $search = RT::Search::Googleish->new(%args);
 
     $m->comp( "Results.html", Query => $search->QueryToSQL() );
     $m->comp( "/Elements/Footer" );