
ruz at bestpractical
Aug 2, 2012, 8:01 AM
Post #1 of 1
(71 views)
Permalink
|
|
rtir branch, 2.6/backport-passing-arguments-on-lookup, created. 2.6.2rc1-1-ga9eb306
|
|
The branch, 2.6/backport-passing-arguments-on-lookup has been created at a9eb306d8bc5072003c3c14248efee5b4269e4c0 (commit) - Log ----------------------------------------------------------------- commit a9eb306d8bc5072003c3c14248efee5b4269e4c0 Author: Ruslan Zakirov <ruz [at] bestpractical> Date: Wed Sep 28 11:55:53 2011 +0400 pass arguments around Conflicts: html/RTIR/Tools/Elements/ToolFormWhois html/RTIR/Tools/Lookup.html diff --git a/html/RTIR/Tools/Elements/ToolFormIframe b/html/RTIR/Tools/Elements/ToolFormIframe index 3c650ec..91f8f4d 100644 --- a/html/RTIR/Tools/Elements/ToolFormIframe +++ b/html/RTIR/Tools/Elements/ToolFormIframe @@ -1,5 +1,7 @@ <form action="Lookup.html" method="get"> - <input type="hidden" name="ticket" value="<% $TicketObj->id %>" /> +% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) { + <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" /> +% } <span class="label"><%loc('Research Tool')%>:</span> <span class="input"> <input size="30" name="q" value="<% $q %>" /> at @@ -12,9 +14,9 @@ <input type="submit" value="<%loc('Go')%>" /> </form> <%args> -$TicketObj => undef $q => undef $ResearchTool => undef +@PassArguments => () </%args> <%INIT> my $unique_id = time().rand(); diff --git a/html/RTIR/Tools/Elements/ToolFormWhois b/html/RTIR/Tools/Elements/ToolFormWhois index 6dac889..f9bf36b 100644 --- a/html/RTIR/Tools/Elements/ToolFormWhois +++ b/html/RTIR/Tools/Elements/ToolFormWhois @@ -1,5 +1,7 @@ <form action="Lookup.html" method="get"> - <input type="hidden" name="ticket" value="<% $TicketObj->id %>" /> +% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) { + <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" /> +% } <tr> <span class="label">WHOIS:</span> <span class="input"> @@ -17,8 +19,8 @@ foreach my $s ( sort grep $servers->{ $_ }, keys %{ $servers } ) { <input type="submit" value="<%loc('Go')%>" /> </form> <%args> -$TicketObj => undef $q => undef $servers => undef $WhoisServer => undef +@PassArguments => () </%args> diff --git a/html/RTIR/Tools/Lookup.html b/html/RTIR/Tools/Lookup.html index 2913ffb..f1a204a 100644 --- a/html/RTIR/Tools/Lookup.html +++ b/html/RTIR/Tools/Lookup.html @@ -42,10 +42,12 @@ <hr> <h2><&|/l&>Look Up Information</&></h2> -<& Elements/Tools, %ARGS, q => $q, - TicketType => $TicketType, +<& Elements/Tools, + %ARGS, + q => $q, TicketObj => $TicketObj, WhoisServer => $server, + PassArguments => [qw(ticket type HideResults)], handparse => $handparse, servers => $servers &> @@ -111,8 +113,6 @@ if ( $ticket ) { $TicketType = RT::IR::TicketType( Ticket => $TicketObj ); } - - </%INIT> <%ARGS> $servers => RT->Config->Get('whois') ----------------------------------------------------------------------- _______________________________________________ Rt-commit mailing list Rt-commit [at] lists http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|