diff options
author | ivan <ivan> | 2008-03-02 04:06:06 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-02 04:06:06 +0000 |
commit | 5e05724a635a22776f1b973f5d7e77989da4e048 (patch) | |
tree | 8c9155a06d82fd0fac65300ce8ca8f51e73d6afc /rt/html/Elements | |
parent | 807bc6bf91e6208fd40bcdf99ce4c0149c2598d2 (diff) | |
parent | 9c68254528b6f2c7d8c1921b452fa56064783782 (diff) |
This commit was generated by cvs2svn to compensate for changes in r6252,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/html/Elements')
61 files changed, 660 insertions, 784 deletions
diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd index b1ba8f69b..e1d1edb7c 100644 --- a/rt/html/Elements/BevelBoxRaisedEnd +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,6 +43,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - </td> -</tr> + </TD> +</TR> </table> diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart index b690c1d74..6c5a6137e 100644 --- a/rt/html/Elements/BevelBoxRaisedStart +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,6 +43,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<table cellspacing="0" cellpadding="0" width="100%" height="100%"> - <tr> - <td width="100%" height="100%"> +<table cellspacing=0 cellpadding=0 width=100% height=100%> + <TR> + <TD width=100% height=100%> diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index b498f2816..c7aeb9f5d 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox index 5593c7a71..f2256fb78 100644 --- a/rt/html/Elements/Checkbox +++ b/rt/html/Elements/Checkbox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +43,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<input type="checkbox" class="checkbox" name="<%$Name%>" value="1" <%$IsChecked%> /> +<INPUT TYPE="Checkbox" NAME="<%$Name%>" value="1" <%$IsChecked%>> <%ARGS> $Name => undef diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header index a3277b317..9ed4be8ec 100644 --- a/rt/html/Elements/CollectionAsTable/Header +++ b/rt/html/Elements/CollectionAsTable/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -56,7 +54,7 @@ $Rows => undef $Page => undef $maxitems => undef </%ARGS> -<tr class="collection-as-table"> +<TR class="collection-as-table"> <%perl> my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString ); @@ -64,18 +62,18 @@ my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format my $item = 0; foreach my $col (@Format) { $item++; - if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) { + if ( $col->{title} eq 'NEWLINE' ) { while ( $item < $maxitems ) { $m->out(qq{<th class="collection-as-table"> </th>\n}); $item++; } $item = 0; - $m->out(qq{</tr>\n<tr class="collection-as-table">}); + $m->out(qq{</TR>\n<TR class="collection-as-table">}); } else { - $m->out('<th class="collection-as-table">'); - my $title = $col->{title} || ''; + $m->out('<TH class="collection-as-table">'); + my $title = $col->{title}; $title =~ s/^__(.*)__$/$1/o; $title = ( $m->comp( @@ -118,8 +116,8 @@ foreach my $col (@Format) { else { $m->out( loc($title) ); } - $m->out('</th>'); + $m->out('</TH>'); } } </%perl> -</tr> +</TR> diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat index 227076093..be56dea76 100644 --- a/rt/html/Elements/CollectionAsTable/ParseFormat +++ b/rt/html/Elements/CollectionAsTable/ParseFormat @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket index 644df223a..bd60bbddf 100644 --- a/rt/html/Elements/CreateTicket +++ b/rt/html/Elements/CreateTicket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,6 +43,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<form action="<% $RT::WebPath %>/Ticket/Create.html" name="CreateTicketInQueue"> -<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" class="button" value="New ticket in" /> [_1]</&> -</form> +<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue"> +<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in"> [_1]</&> +</FORM> diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField index d247c63f1..e443c764e 100644 --- a/rt/html/Elements/EditCustomField +++ b/rt/html/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,7 +45,7 @@ %# END BPS TAGGED BLOCK }}} <%INIT> my $Values; -if ($Object and $Object->id) { +if ($Object) { $Values = $Object->CustomFieldValues($CustomField->id); $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) ); $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', ''); @@ -69,14 +67,10 @@ if ($MaxValues == 1 and $Object and $Values) { } # The "Magic" hidden input causes RT to know that we were trying to edit the field, even if # we don't see a value later, since browsers aren't compelled to submit empty form fields -$m->out("\n".'<input type="hidden" class="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1" />'."\n"); - -my $EditComponent = "EditCustomField$Type"; -$m->comp('/Elements/Callback', _CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object ); -$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent); +$m->out("\n".'<input type="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1">'."\n"); return $m->comp( - $EditComponent, + "EditCustomField$Type", %ARGS, Rows => $Rows, Cols => $Cols, diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary index 485457c25..002825660 100644 --- a/rt/html/Elements/EditCustomFieldBinary +++ b/rt/html/Elements/EditCustomFieldBinary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,10 +45,10 @@ %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { %# XXX - let user download the file(s) here? -<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br /> +<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br> % } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { -<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" /> +<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload"> % } <%ARGS> $Object => undef diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Elements/EditCustomFieldFreeform index 2eb49eb6b..c097ee0a9 100644 --- a/rt/html/Elements/EditCustomFieldFreeform +++ b/rt/html/Elements/EditCustomFieldFreeform @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,20 +43,17 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% my $name = $NamePrefix . $CustomField->Id . '-Value'; % if ($Multiple) { -<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" ><%$Default%></textarea> +<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea> % } else { -<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" /> +<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>"> % } <%INIT> if ($Multiple and $Values) { - $Default = ''; - while (my $value = $Values->Next ) { - $Default .= $value->Content."\n"; - } -} else { - $Default =~ s/\s*\n\s*/ /g if $Default; + $Default = ''; + while (my $value = $Values->Next ) { + $Default .= $value->Content."\n"; + } } </%INIT> <%ARGS> diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage index b6a30c659..b378ceae6 100644 --- a/rt/html/Elements/EditCustomFieldImage +++ b/rt/html/Elements/EditCustomFieldImage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,11 +44,11 @@ %# %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { -<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><& ShowCustomFieldImage, Object => $value &> -<br /> +<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><& ShowCustomFieldImage, Object => $value &> +<br> % } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { -<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" /> +<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload"> % } <%ARGS> $Object => undef diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect index 815e977a0..5dd4d0d69 100644 --- a/rt/html/Elements/EditCustomFieldSelect +++ b/rt/html/Elements/EditCustomFieldSelect @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,84 +43,30 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -%# Build up the set of cascading select boxes as "guides" -%# each one limits the options of the final one a bit -%# (perhaps by tweaking the .display style?) -% my $selected = 0; -% my @category; -% my $id = $NamePrefix . $CustomField->Id; -% my $out = $m->scomp('SELF:options', %ARGS, SelectedRef => \$selected, CategoryRef => \@category); -% if (@category) { -<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/cascaded.js"></script> -%# XXX - Hide this select from w3m? - <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<%$id%>-Category"> - <option value="" <% !$selected && 'SELECTED' %>><&|/l&>-</&></option> -% foreach my $cat (@category) { -% my ($depth, $name) = @$cat; - <option value="<% $name %>"><% ' ' x $depth |n %><%$name%></option> -% } - </select><br /> -% } - <select name="<%$id%>-Values" id="<%$id%>-Values" -% if ($Multiple or !@category) { + <select name="<%$NamePrefix%><%$CustomField->Id%>-Values" size="<%$Rows%>" -% } <% $Multiple && 'MULTIPLE' %>> - <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option> -% $m->out($out); - </select> -<%ARGS> -$Object => undef -$CustomField => undef -$NamePrefix => undef -$Default => undef -$Values => undef -$Multiple => 0 -$Rows => undef -</%ARGS> - -<%method options> % my $selected; % my $CFVs = $CustomField->Values; -% my @levels; % while ($CFVs and my $value = $CFVs->Next ) { -% my $category = $value->Category; -% if (1) { # length $category) { -% my $level = (split(/:/, $category || ''))[0]; -% while (@levels) { -% if ($levels[-1] eq $level) { -% undef $level; -% last; -% } elsif (index($level, $levels[-1]) != 0) { - </optgroup> -% pop @levels; -% } else { -% last; -% } -% } -% if ($level) { -% push @$CategoryRef, [0+@levels, $level]; - <optgroup style="padding-left: <% @levels/2 %>em" label="<%$category%>"> -% push @levels, $level; -% } -% } <option value="<%$value->Name%>" % if ($Values) { - <% ($Values->HasEntry($value->Name)||'') && ($$SelectedRef = 1) && 'SELECTED' %> + <% ($Values->HasEntry($value->Name)||'') && ($selected = 1) && 'SELECTED' %> % } elsif ($Default) { <% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name)) - && ($$SelectedRef = 1) && 'SELECTED' %> + && ($selected = 1) && 'SELECTED' %> % } ><% $value->Name%></option> % } -% for (@levels) { - </optgroup> -% } -<%args> + <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option> + </select> +<%ARGS> +$Object => undef $CustomField => undef +$NamePrefix => undef $Default => undef $Values => undef -$SelectedRef => undef -$CategoryRef => undef -</%args> -</%method> +$Multiple => 0 +$Cols +$Rows +</%ARGS> diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText index b7569b003..1aac3283b 100644 --- a/rt/html/Elements/EditCustomFieldText +++ b/rt/html/Elements/EditCustomFieldText @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,10 +44,10 @@ %# %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { -<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br /> +<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br> % } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { -<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea> +<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea> % } <%INIT> # XXX - MultiValue textarea is for now outlawed. diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext index b7569b003..1aac3283b 100644 --- a/rt/html/Elements/EditCustomFieldWikitext +++ b/rt/html/Elements/EditCustomFieldWikitext @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,10 +44,10 @@ %# %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { -<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br /> +<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br> % } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { -<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea> +<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea> % } <%INIT> # XXX - MultiValue textarea is for now outlawed. diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks index 32c75a5a4..68c08dd16 100755 --- a/rt/html/Elements/EditLinks +++ b/rt/html/Elements/EditLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,9 +43,9 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<table width="100%"> - <tr> - <td valign="top" width="50%"> +<TABLE width=100%> + <TR> + <TD VALIGN=TOP WIDTH=50%> <h3><&|/l&>Current Links</&></h3> <table> @@ -59,8 +57,8 @@ <td class="labeltop"><&|/l&>Depends on</&>:</td> <td class="value"> % while (my $link = $Object->DependsOn->Next) { - <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" /> - <& ShowLink, URI => $link->TargetURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1"> + <& ShowLink, URI => $link->TargetURI &><br> % } </td> </tr> @@ -69,8 +67,8 @@ <td class="value"> % while (my $link = $Object->DependedOnBy->Next) { % my $member = $link->BaseObj; - <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" /> - <& ShowLink, URI => $link->BaseURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1"> + <& ShowLink, URI => $link->BaseURI &><br> % } </td> </tr> @@ -78,8 +76,8 @@ <td class="labeltop"><&|/l&>Parents</&>:</td> <td class="value"> % while (my $link = $Object->MemberOf->Next) { - <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" /> - <& ShowLink, URI => $link->TargetURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1"> + <& ShowLink, URI => $link->TargetURI &><br> % } </td> </tr> @@ -87,8 +85,8 @@ <td class="labeltop"><&|/l&>Children</&>:</td> <td class="value"> % while (my $link = $Object->Members->Next) { - <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" /> - <& ShowLink, URI => $link->BaseURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1"> + <& ShowLink, URI => $link->BaseURI &><br> % } </td> </tr> @@ -96,8 +94,8 @@ <td class="labeltop"><&|/l&>Refers to</&>:</td> <td class="value"> % while (my $link = $Object->RefersTo->Next) { - <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" /> - <& ShowLink, URI => $link->TargetURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1"> + <& ShowLink, URI => $link->TargetURI &><br> %} </td> </tr> @@ -105,63 +103,61 @@ <td class="labeltop"><&|/l&>Referred to by</&>:</td> <td class="value"> % while (my $link = $Object->ReferredToBy->Next) { -% # Skip reminders -% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder'); - <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" /> - <& ShowLink, URI => $link->BaseURI &><br /> + <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1"> + <& ShowLink, URI => $link->BaseURI &><br> % } </td> </tr> </table> -</td> -<td valign="top"> +</TD> +<TD VALIGN=TOP> <h3><&|/l&>New Links</&></h3> % if (ref($Object) eq 'RT::Ticket') { <i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&> <& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &> -</i><br /> +</i><br> % } elsif (ref($Object) eq 'RT::Queue') { <i><&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.</&> -</i><br /> +</i><br> % } else { -<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br /> +<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br> % } -<table> +<TABLE> % if ($Merge) { - <tr> - <td class="label"><&|/l&>Merge into</&>:</td> - <td class="entry"><input name="<%$id%>-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td> - </tr> + <TR> + <TD class="label"><&|/l&>Merge into</&>:</TD> + <TD class="entry"><input name="<%$id%>-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD> + </TR> % } - <tr> - <td class="label"><&|/l&>Depends on</&>:</td> - <td class="entry"><input name="<%$id%>-DependsOn" /></td> - </tr> - <tr> - <td class="label"><&|/l&>Depended on by</&>:</td> - <td class="entry"><input name="DependsOn-<%$id%>" /></td> - </tr> - <tr> - <td class="label"><&|/l&>Parents</&>:</td> - <td class="entry"><input name="<%$id%>-MemberOf" /></td> - </tr> - <tr> - <td class="label"><&|/l&>Children</&>:</td> - <td class="entry"> <input name="MemberOf-<%$id%>" /></td> - </tr> - <tr> - <td class="label"><&|/l&>Refers to</&>:</td> - <td class="entry"><input name="<%$id%>-RefersTo" /></td> - </tr> - <tr> - <td class="label"><&|/l&>Referred to by</&>:</td> - <td class="entry"> <input name="RefersTo-<%$id%>" /></td> - </tr> -</table> -</td> -</tr> -</table> + <TR> + <TD class="label"><&|/l&>Depends on</&>:</TD> + <TD class="entry"><input name="<%$id%>-DependsOn"></TD> + </TR> + <TR> + <TD class="label"><&|/l&>Depended on by</&>:</TD> + <TD class="entry"><input name="DependsOn-<%$id%>"></TD> + </TR> + <TR> + <TD class="label"><&|/l&>Parents</&>:</TD> + <TD class="entry"><input name="<%$id%>-MemberOf"></TD> + </TR> + <TR> + <TD class="label"><&|/l&>Children</&>:</TD> + <TD class="entry"> <input name="MemberOf-<%$id%>"></TD> + </TR> + <TR> + <TD class="label"><&|/l&>Refers to</&>:</TD> + <TD class="entry"><input name="<%$id%>-RefersTo"></TD> + </TR> + <TR> + <TD class="label"><&|/l&>Referred to by</&>:</TD> + <TD class="entry"> <input name="RefersTo-<%$id%>"></TD> + </TR> +</TABLE> +</TD> +</TR> +</TABLE> <%INIT> my $id; diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error index 369327406..bc5a1880a 100644 --- a/rt/html/Elements/Error +++ b/rt/html/Elements/Error @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,13 +44,15 @@ %# %# END BPS TAGGED BLOCK }}} <& /Elements/Callback, %ARGS, error => $error &> -<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &> -<& /Elements/Tabs, Title => $Title &> -<div class="error"> +<& /Elements/Header, Code => $Code, Why => $Why &> +<& /Elements/Tabs &> +<& /Elements/TitleBoxStart, class=> "error", title => $Title &> <%$Why%> -<br /> +<br> +<font size=-1> <%$Details%> -</div> +</font> +<& /Elements/TitleBoxEnd &> <%cleanup> $m->comp('/Elements/Footer'); @@ -61,7 +61,7 @@ $m->abort(); <%args> $Code => undef -$Details =>'' +$Details => undef $Title => loc("RT Error") $Why => loc("the calling component did not specify why") </%args> @@ -77,7 +77,7 @@ if ($] >= 5.007001) { $RT::Logger->error($error); -if ( defined ($session{'SessionType'}) && $session{'SessionType'} eq 'REST' ) { +if ( $session{'SessionType'} eq 'REST' ) { $r->content_type('text/plain'); $m->out( "Error: " . $Why . "\n" ); $m->out( $Details . "\n" ); diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket index ad6ad1b15..869d57ef1 100644 --- a/rt/html/Elements/GotoTicket +++ b/rt/html/Elements/GotoTicket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,4 +43,4 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<form action="<%$RT::WebPath%>/Ticket/Display.html"><input type="submit" class="button" value="<&|/l&>Goto ticket</&>" /> <input size="5" name="id" accesskey="0" /></form> +<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>"> <input size=5 name=id accesskey="0"></FORM> diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions index 24f923a8a..8433d17e0 100644 --- a/rt/html/Elements/ListActions +++ b/rt/html/Elements/ListActions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,20 +43,22 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&| /Widgets/TitleBox, title => loc('Results') &> - <ul class="action-results"> +% if ($actions[0] ) { +<& /Elements/TitleBoxStart, title => loc('Results') &> +<UL> % foreach my $action (@actions) { -% next unless $action; -% my $skip = 0; -% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS); -% next if $skip; - <li><%$action%></li> +% next unless ($action); +% my $skip = 0; +% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS); +% next if $skip; +<LI><%$action%></LI> +% } +</UL> +<& /Elements/TitleBoxEnd &> +<BR> % } - </ul> -</&> <%init> -@actions = grep $_, @actions; -return unless @actions; +@actions = grep (/./,@actions); </%init> <%ARGS> @actions => undef diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login index cd39b87d8..1d4bfd5ec 100644 --- a/rt/html/Elements/Login +++ b/rt/html/Elements/Login @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -53,58 +51,36 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { $m->out("\n$Error\n") if $Error; $m->abort; } - -my $req_uri; - -if (UNIVERSAL::can($r, 'uri') and $r->uri =~ m{.*/(.*)}) { - $req_uri = $1; -} - -my $form_action = defined $goto ? $goto - : defined $req_uri ? $req_uri - : $RT::WebPath - ; </%INIT> <& /Elements/Callback, %ARGS, _CallbackName => 'Header' &> <& /Elements/Header, Title => loc('Login'), Focus => 'user' &> -%# End of div#quickbar from /Elements/Header -</div> - -<div id="body" class="login-body"> - +<DIV ALIGN=CENTER> % if ($Error) { -<&| "/Widgets/TitleBox", title => loc('Error'), hideable => 0 &> +<& /Elements/TitleBoxStart, title => loc('Error') &> <% $Error %> -</&> +<& /Elements/TitleBoxEnd &> % } - -<& /Elements/Callback, %ARGS, _CallbackName => 'BeforeForm' &> - -<div id="login-box"> -<&| /Widgets/TitleBox, title => loc('Login'), titleright => $RT::VERSION, hideable => 0 &> +<BR> +<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') , +contentbg=>"#cccccc" &> % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -<form id="login" name="login" method="post" action="<% $form_action %>"> - -<div class="input-row"> - <span class="label"><&|/l&>Username</&>:</span> - <span class="input"><input name="user" value="<%$user%>" id="user" /></span> -</div> - -<div class="input-row"> - <span class="label"><&|/l&>Password</&>:</span> - <span class="input"><input type="password" name="pass" /></span> -</div> - -<div class="button-row"> - <span class="input"><input type="submit" class="button" value="<&|/l&>Login</&>" /></span> -</div> +<FORM id="login" name="login" METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" > +<TABLE BORDER=0 WIDTH=100%> +<TR ALIGN=RIGHT> +<TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Password</&>:</TD><TD ALIGN=LEFT><input type=password name=pass></TD></TR> +<TR><TD colspan=2 align=right> +<input type=submit Value="<&|/l&>Login</&>"> +</TD></TR> +</TABLE> %# Give callbacks a chance to add more control elements <& /Elements/Callback, %ARGS &> +<&/Elements/TitleBoxEnd&> % # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things. % # But on Mason 1.15 it's fixed again, so we still use it. % # The code below iterates through everything in the passed in arguments @@ -116,19 +92,27 @@ my $form_action = defined $goto ? $goto % if (($key ne 'user') and ($key ne 'pass')) { % if (ref($ARGS{$key}) =~ /ARRAY/) { % foreach $val (@{$ARGS{$key}}) { -<input type="hidden" class="hidden" name="<%$key %>" value="<% $val %>" /> +<input type=hidden name="<%$key %>" value="<% $val %>"> % } % } % else { -<input type="hidden" class="hidden" name="<% $key %>" value="<% $ARGS{$key} %>" /> +<input type="hidden" name="<% $key %>" value="<% $ARGS{$key} %>"> % } % } % } -</form> +</FORM> % } -</&> -</div><!-- #login-box --> -<& /Elements/Callback, %ARGS, _CallbackName => 'AfterForm' &> +</DIV> + +<BR> +<!-- TODO: not yet implemented +If you've forgotten your username or password, RT can <A +href="/NoAuth/Reminder.html">send you a reminder</a>. +--> +<BR> +<BR> +<BR> +<HR> <& /Elements/Footer, Menu => 0 &> <%ARGS> $user => "" diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index 0149e1b30..dd48bec9a 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,10 +43,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<textarea class="messagebox" cols="<%$Width%>" rows="<%$Height%>" wrap="<%$Wrap%>" name="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea> +<textarea class="messagebox" COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea> <%INIT> -my $message = ''; +my ($message); if ($QuoteTransaction) { my $transaction=RT::Transaction->new($session{'CurrentUser'}); diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests index fc1e27095..172b4a4fa 100644 --- a/rt/html/Elements/MyRequests +++ b/rt/html/Elements/MyRequests @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,5 +43,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -%# DEPRECATED -<& /Elements/ShowSearch, Name => 'My Requests' &> +<&|/Elements/TitleBox, + title => loc("[_1] newest unowned tickets", $rows), + title_href => "Search/Results.html".$QueryString &> +<& /Elements/TicketList, + Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '<A HREF=\"$RT::WebPath/Ticket/Display.html?Action=Take&id=__id__\">".loc('Take')."</a>/TITLE: ' ", + Query => $Query, + OrderBy => 'Created', + Order => 'DESC', + ShowNavigation => 0, + Rows => $rows + + &> +</&> +<%init> +my $rows = $RT::MyRequestsLength; + +my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')"; + +my $QueryString = ""; +$QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); + +</%init> diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets index 8d657db3d..cf5225abc 100644 --- a/rt/html/Elements/MyTickets +++ b/rt/html/Elements/MyTickets @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,5 +43,29 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -%# DEPRECATED -<& /Elements/ShowSearch, Name => 'My Tickets' &> +<&|/Elements/TitleBox, + title => loc('[_1] highest priority tickets I own', $rows), + title_href => "Search/Results.html".$QueryString &> +<& /Elements/TicketList, + Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', Priority, QueueName, ExtendedStatus", + + Query => $Query, + OrderBy => 'Priority', + Order => 'DESC', + Rows => $rows, + ShowNavigation => 0 + &> +</&> +<%init> +my $rows = $RT::MyTicketsLength; + +my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')"; + +my $QueryString = ""; +$QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); + +</%init> + diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index 0176180d2..1ddab85de 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,12 +49,7 @@ while ( my ($key, $value) = each %ARGS ){ if( UNIVERSAL::isa( $value, 'ARRAY' ) ) { push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value; } else { - if (ref $value eq "ARRAY") { - push @params, $key."=".$m->interp->apply_escapes($_, 'u') - for @{$value}; - } else { - push @params, $key."=".$m->interp->apply_escapes($value||"",'u'); - } + push @params, $key."=".$m->interp->apply_escapes($value,'u'); } } return(join('&',@params)); diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch index 4acbc204d..5f1af0f2d 100644 --- a/rt/html/Elements/Quicksearch +++ b/rt/html/Elements/Quicksearch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,17 +43,44 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<div class="ticket-overview"> -<&|/Widgets/TitleBox, title => loc("Quick search"), bodyclass => "", - titleright => loc("Edit"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &> -<& /Elements/QueueSummary, - cache => 'quick_search_queues', - queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} }, - conditions => [ {cond => "Status = 'new'", name => loc ('new') }, - {cond => "Status = 'open'", name => loc ('open') }, - {cond => "Status = 'stalled'", name => loc ('stalled') }] &> -</&> -</div> +<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> + +<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%> +<tr> + <th class="collection-as-table" align=left><&|/l&>Queue</&></th> + <th class="collection-as-table" align=right><&|/l&>New</&></th> + <th class="collection-as-table" align=right><&|/l&>Open</&></th> +</tr> + +<%PERL> +my $i; +while (my $queue = $Queues->Next) { + next unless ($queue->CurrentUserHasRight('ShowTicket')); + + my $qid = $queue->Id; + my $new_q = "Queue = '$qid' AND Status = 'new'"; + my $open_q = "Queue = '$qid' AND Status = 'open'"; + my $all_q = "Queue = '$qid' AND (Status = 'open' OR Status = 'new')"; + + $Tickets->FromSQL($open_q); + my $open = $Tickets->Count(); + + $Tickets->FromSQL($new_q); + my $new = $Tickets->Count(); + + $i++; +</%PERL> +<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q |nu%>&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD> +<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$new_q |nu%>&Rows=50"><%$new%></a></TD> +<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$open_q |nu%>&Rows=50"><%$open%></a></TD> +</TR> +% } +</TABLE> +<& /Elements/TitleBoxEnd &> + <%INIT> -my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {}); +my $Queues = RT::Queues->new($session{'CurrentUser'}); +$Queues->UnLimit(); +my $Tickets = RT::Tickets->new($session{'CurrentUser'}); </%INIT> diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap index 21dc2a753..80e3c693c 100644 --- a/rt/html/Elements/RT__Ticket/ColumnMap +++ b/rt/html/Elements/RT__Ticket/ColumnMap @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,7 +52,7 @@ $Attr => undef <%ONCE> our ( $COLUMN_MAP ); -my $ColumnMap = sub { +sub ColumnMap { my $name = shift; my $attr = shift; @@ -79,22 +77,20 @@ my $ColumnMap = sub { # For Image custom fields we also show a thumbnail here. return sub { my $values = $_[0]->CustomFieldValues($field); - my @values = map { + return map { ( ($_->CustomFieldObj->Type eq 'Image') ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ )) : $_->Content ), - \'<br />', - } @{ $values->ItemsArrayRef }; - pop @values; # Remove that last <br /> - return @values; + \'<br>', + } @{ $values->ItemsArrayRef } }; } } -}; +} -my $LinkCallback = sub { +sub LinkCallback { my $method = shift; my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode}; @@ -105,14 +101,14 @@ my $LinkCallback = sub { return sub { map { - \'<a href="', + \'<A HREF="', $_->$mode_uri->Resolver->HREF, \'">', ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ), - \'</a><br />', + \'</A><BR>', } @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef } } -}; +} $COLUMN_MAP = { QueueName => { @@ -198,15 +194,12 @@ $COLUMN_MAP = { value => sub { return $_[0]->TimeEstimated } }, Requestors => { - attribute => 'Requestor.EmailAddress', value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString } }, Cc => { - attribute => 'Cc.EmailAddress', value => sub { return $_[0]->Cc->MemberEmailAddressesAsString } }, AdminCc => { - attribute => 'AdminCc.EmailAddress', value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString } }, StartsRelative => { @@ -293,22 +286,16 @@ $COLUMN_MAP = { # Everything from LINKTYPEMAP (map { - $_ => { value => $LinkCallback->( $_ ) } + $_ => { value => LinkCallback( $_ ) } } keys %RT::Ticket::LINKTYPEMAP), '_CLASS' => { value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' } }, - '_CHECKBOX' => { - attribute => 'checkbox', - title => loc('Update'), - align => 'right', - value => sub { return \('<input type="checkbox" class="checkbox" name="UpdateTicket'.$_[0]->id.'" value="1" checked />') } - }, }; </%ONCE> <%init> $m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap'); -return $ColumnMap->( $Name, $Attr ); +return ColumnMap($Name, $Attr); </%init> diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh index 6edec0967..9f241d279 100644 --- a/rt/html/Elements/Refresh +++ b/rt/html/Elements/Refresh @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,20 +43,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> -<option value="-1" +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="-1" %unless ($Default) { - selected + SELECTED %} -><&|/l&>Don't refresh this page.</&></option> +><&|/l&>Don't refresh this page.</&></OPTION> %foreach my $value (@refreshevery) { -<option value="<%$value%>" +<OPTION VALUE="<%$value%>" % if ( $Default && ($value == $Default)) { -selected +SELECTED % } -><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></option> +><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></OPTION> %} -</select> +</SELECT> <%INIT> my @refreshevery = qw(120 300 600 1200 3600 7200); diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML index f382cc273..443ded9c4 100644 --- a/rt/html/Elements/ScrubHTML +++ b/rt/html/Elements/ScrubHTML @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,8 +52,8 @@ $scrubber->default( '*' => 0, id => 1, class => 1, + href => qr{^(?:http:|ftp:|https:|/)}i, # Match http, ftp and relative urls - href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i, face => 1, size => 1, target => 1 diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section index befe2475f..afbb9cf38 100644 --- a/rt/html/Elements/Section +++ b/rt/html/Elements/Section @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +43,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<h1><%$title%></h1> +<TABLE WIDTH=100%> +<TR> +<TD> +<font size=+4><%$title%></font> +</TD> +</TR> +</TABLE> + <%ARGS> $title => undef </%ARGS> diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField index 8a37ca504..ea1528c03 100644 --- a/rt/html/Elements/SelectAttachmentField +++ b/rt/html/Elements/SelectAttachmentField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,12 +43,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> -<option value="Subject"><&|/l&>Subject</&></option> -<option value="Content"><&|/l&>Content</&></option> -<option value="ContentType"><&|/l&>Content-Type</&></option> -<option value="Filename"><&|/l&>Filename</&></option> -</select> +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="Subject"><&|/l&>Subject</&></OPTION> +<OPTION VALUE="Content"><&|/l&>Content</&></OPTION> +<OPTION VALUE="ContentType"><&|/l&>Content-Type</&></OPTION> +<OPTION VALUE="Filename"><&|/l&>Filename</&></OPTION> +</SELECT> <%ARGS> $Name => 'AttachmentField' </%ARGS> diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean index b34e07a14..a3f08fdbc 100644 --- a/rt/html/Elements/SelectBoolean +++ b/rt/html/Elements/SelectBoolean @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,10 +43,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> -<option value="<%$TrueVal%>" <%$TrueDefault%>><%$True%></option> -<option value="<%$FalseVal%>" <%$FalseDefault%>><%$False%></option> -</select> +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION> +<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION> +</SELECT> <%ARGS> $Name => undef @@ -60,8 +58,7 @@ $False => loc("isn't") </%ARGS> <%INIT> -my $TrueDefault = ''; -my $FalseDefault =''; +my ($TrueDefault, $FalseDefault); if ($Default && $Default !~ /true/i) { $FalseDefault = "SELECTED"; } diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator index ecb306c58..8f7ea618b 100644 --- a/rt/html/Elements/SelectCustomFieldOperator +++ b/rt/html/Elements/SelectCustomFieldOperator @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,20 +43,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> +<SELECT NAME ="<%$Name%>"> % while (my $option = shift @Options) { % my $value = shift @Values; -<option value="<%$value%>" +<OPTION VALUE="<%$value%>" % if ($Default eq $value) { -selected +SELECTED % } -><%$option%></option> +><%$option%></OPTION> % } -</select> +</SELECT> <%ARGS> $Name => undef @Options => ( loc('contains'), loc("doesn't contain"), loc('is'), loc("isn't"), loc('less than'), loc('greater than')) @Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>') -$Default => '' +$Default => undef </%ARGS> diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue index 2bcb35e9a..27d6c4995 100644 --- a/rt/html/Elements/SelectCustomFieldValue +++ b/rt/html/Elements/SelectCustomFieldValue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,7 +47,7 @@ % if ($CustomField->Type =~ /Select/i) { % my $values = $CustomField->Values; <select name="<%$Name%>"> -<option value="" selected>-</option> +<option value="" SELECTED>-</option> <option value="NULL"><&|/l&>(no value)</&></option> % while (my $value = $values->Next) { <option value="<%$value->Name%>"><%$value->Name%></option> @@ -57,7 +55,7 @@ </select> % } % else { -<input name="<%$Name%>" size="20" /> +<input name="<%$Name%>" size="20"> % } <%args> $Name => undef diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate index b43f324ac..d3815798b 100644 --- a/rt/html/Elements/SelectDate +++ b/rt/html/Elements/SelectDate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,10 +43,8 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<script type="text/javascript"><!-- - onLoadHook('createCalendarLink("<% $Name %>");'); ---></script> -<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" /> +<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=<%$Size%>> + <%init> unless ((defined $Default) or ($current <= 0)) { @@ -69,7 +65,7 @@ unless ($Name) { $ShowTime => undef $menu_prefix=>'' $current=>time -$Default => '' +$Default => undef $Name => undef $Size => 16 </%args> diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation index 9c80be4d7..ccf0c1121 100644 --- a/rt/html/Elements/SelectDateRelation +++ b/rt/html/Elements/SelectDateRelation @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,11 +43,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> -<option value="<"><%$Before%></option> -<option value="="><%$On%></option> -<option value=">"><%$After%></option> -</select> +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="<"><%$Before%></OPTION> +<OPTION VALUE="="><%$On%></OPTION> +<OPTION VALUE=">"><%$After%></OPTION> +</SELECT> <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType index 653949a83..7b3f0990f 100644 --- a/rt/html/Elements/SelectDateType +++ b/rt/html/Elements/SelectDateType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,16 +43,16 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> -<option value="Created"><&|/l&>Created</&></option> -<option value="Started"><&|/l&>Started</&></option> -<option value="Resolved"><&|/l&>Resolved</&></option> -<option value="Told"><&|/l&>Last Contacted</&></option> -<option value="LastUpdated"><&|/l&>Last Updated</&></option> -<option value="Starts"><&|/l&>Starts</&></option> -<option value="Due"><&|/l&>Due</&></option> -<option value="Updated"><&|/l&>Updated</&></option> -</select> +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="Created"><&|/l&>Created</&></OPTION> +<OPTION VALUE="Started"><&|/l&>Started</&></OPTION> +<OPTION VALUE="Resolved"><&|/l&>Resolved</&></OPTION> +<OPTION VALUE="Told"><&|/l&>Last Contacted</&></OPTION> +<OPTION VALUE="LastUpdated"><&|/l&>Last Updated</&></OPTION> +<OPTION VALUE="Starts"><&|/l&>Starts</&></OPTION> +<OPTION VALUE="Due"><&|/l&>Due</&></OPTION> +<OPTION VALUE="Updated"><&|/l&>Updated</&></OPTION> +</SELECT> <%ARGS> $Name => 'DateType' </%ARGS> diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator index 851add309..0f8deea89 100644 --- a/rt/html/Elements/SelectEqualityOperator +++ b/rt/html/Elements/SelectEqualityOperator @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,16 +43,16 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> +<SELECT NAME ="<%$Name%>"> % while (my $option = shift @Options) { % my $value = shift @Values; -<option value="<%$value%>" +<OPTION VALUE="<%$value%>" % if ($Default eq $value) { -selected +SELECTED % } -><%$option%></option> +><%$option%></OPTION> % } -</select> +</SELECT> <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups index c1fb9df2a..bc37fd69a 100644 --- a/rt/html/Elements/SelectGroups +++ b/rt/html/Elements/SelectGroups @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,14 +45,14 @@ %# END BPS TAGGED BLOCK }}} <select name="GroupField"> % foreach my $col (RT::Group->BasicColumns) { -<option value="<% $col->[0] %>"><% loc($col->[1]) %></option> +<option value="<% $col->[0] %>"><% loc($col->[1]) %> % } % while (my $CF = $CFs->Next) { -<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option> +<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %> % } </select> <& /Elements/SelectMatch, Name=> 'GroupOp' &> -<input size="8" name="GroupString" /> +<input size=8 name="GroupString"> <%INIT> my $CFs = RT::CustomFields->new($session{'CurrentUser'}); $CFs->LimitToChildType('RT::Group'); diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang index 7640744c9..a439ea330 100644 --- a/rt/html/Elements/SelectLang +++ b/rt/html/Elements/SelectLang @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,18 +43,18 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> +<SELECT NAME ="<%$Name%>"> % if ($ShowNullOption) { -<option value="">-</option> +<OPTION VALUE="">-</OPTION> % } % foreach my $lang (@lang) { -<option value="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %> +<OPTION VALUE="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %> % if (($Verbose) and (my $description = I18N::LangTags::List::native_name($lang)) ){ (<%$description%>) % } -</option> +</OPTION> % } -</select> +</SELECT> <%ARGS> $ShowNullOption => 1 $ShowAllQueues => 1 diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType index 4617e7c1c..28cb4419a 100644 --- a/rt/html/Elements/SelectLinkType +++ b/rt/html/Elements/SelectLinkType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,11 +43,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> -<option value="MemberOf"><&|/l&>Member of</&></option> -<option value="DependsOn"><&|/l&>Depends on</&></option> -<option value="RefersTo"><&|/l&>Refers to</&></option> -</select> +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="MemberOf"><&|/l&>Member of</&></OPTION> +<OPTION VALUE="DependsOn"><&|/l&>Depends on</&></OPTION> +<OPTION VALUE="RefersTo"><&|/l&>Refers to</&></OPTION> +</SELECT> <%ARGS> $Name => "LinkType" diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch index 646ad4e31..60949d979 100644 --- a/rt/html/Elements/SelectMatch +++ b/rt/html/Elements/SelectMatch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,12 +43,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> -<option value="LIKE" <%$LikeDefault%>><%$Like%></option> -<option value="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></option> -<option value="=" <%$TrueDefault%>><%$True%></option> -<option value="!=" <%$FalseDefault%>><%$False%></option> -</select> +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION> +<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION> +<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION> +<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION> +</SELECT> <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue index 55dc7d2ea..51b89b2a6 100644 --- a/rt/html/Elements/SelectNewTicketQueue +++ b/rt/html/Elements/SelectNewTicketQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,6 +43,39 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<label accesskey="9"> - <& /Elements/SelectQueue, Name => 'Queue', %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &> -</label> +<LABEL ACCESSKEY="9"> +<SELECT NAME ="<%$Name%>"> +% foreach my $queue (@{$session{'create_in_queues'}}) { +<OPTION + VALUE="<%$queue->{'id'}%>" + <% $Default && $queue->{'id'} == $Default ? 'SELECTED': ''%>> +<%$queue->{'Name'}%> +% if (($Verbose) and ($queue->{'Description'}) ){ +(<%$queue->{'Description'}%>) +% } +</OPTION> +% } +</SELECT> +</LABEL> + +<%INIT> +unless ($session{'create_in_queues'}) { + +@{$session{'create_in_queues'}} = (); +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; +while (my $queue=$q->Next) { + if ($queue->CurrentUserHasRight('CreateTicket')) { + my $ds = { Name => $queue->Name, Description => $queue->Description, id => $queue->id }; + push (@{$session{'create_in_queues'}}, $ds); + } +} +} +</%INIT> + + +<%ARGS> +$Name => 'Queue' +$Verbose => 0 +$Default => 0 +</%ARGS> diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner index f33b346dc..85843e5f0 100644 --- a/rt/html/Elements/SelectOwner +++ b/rt/html/Elements/SelectOwner @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,20 +43,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> +<SELECT NAME="<%$Name%>"> %if ($DefaultValue) { -<option <% !$Default ? "SELECTED" : '' %> value=""><%$DefaultLabel%></option> +<OPTION <% !$Default ? "SELECTED" : '' %> VALUE=""><%$DefaultLabel%></OPTION> %} %foreach my $User ( @users) { -<option <% ($User->Id == $Default) ? "SELECTED" : ''%> +<OPTION <% ($User->Id == $Default) ? "SELECTED" : ''%> %if ($ValueAttribute eq 'id') { value="<%$User->id%>" %} elsif ($ValueAttribute eq 'Name') { value="<%$User->Name%>" %} -><%$User->Name()%></option> +><%$User->Name()%></OPTION> %} -</select> +</SELECT> <%INIT> my @objects; my @users; diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue index 0decb5bc9..56aede89f 100644 --- a/rt/html/Elements/SelectQueue +++ b/rt/html/Elements/SelectQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,26 +44,26 @@ %# %# END BPS TAGGED BLOCK }}} % if ($Lite) { -% my $d = new RT::Queue($session{'CurrentUser'}); -% $d->Load($Default); -<input name="<%$Name%>" size="25" value="<%$d->Name%>" /> +% my $d = new RT::Queue($session{'CurrentUser'}); +% $d->Load($Default); +<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>"> +% } else { +<SELECT NAME ="<%$Name%>"> +% if ($ShowNullOption) { +<OPTION VALUE="">-</OPTION> % } -% else { -<select name="<%$Name%>"> -% if ($ShowNullOption) { - <option value="">-</option> -% } -% for my $queue (@{$session{$cache_key}}) { - <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <% ($queue->{Id} eq $Default ? 'selected="selected"' : '') |n %>> - <%$queue->{Name}%> -% if ($Verbose and $queue->{Description}) { - (<%$queue->{Description}%>) -% } - </option> -% } -</select> +% while (my $queue=$q->Next) { +% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) { +<OPTION VALUE="<%($NamedValues ? $queue->Name : $queue->Id) %>" <%( $queue->Id eq $Default ? 'SELECTED' : '')%>><%$queue->Name%> +% if (($Verbose) and ($queue->Description) ){ +(<%$queue->Description%>) +% } +</OPTION> % } -<%args> +% } +</SELECT> +% } +<%ARGS> $CheckQueueRight => 'CreateTicket' $ShowNullOption => 1 $ShowAllQueues => 1 @@ -74,24 +72,11 @@ $Verbose => undef $NamedValues => 0 $Default => 0 $Lite => 0 -</%args> -<%init> -my $cache_key = "SelectQueue---" - . $session{'CurrentUser'}->Id - . "---$CheckQueueRight---$ShowAllQueues"; +</%ARGS> + +<%INIT> + +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; -if (not defined $session{$cache_key} and not $Lite) { - my $q = new RT::Queues($session{'CurrentUser'}); - $q->UnLimit; - - while (my $queue = $q->Next) { - if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) { - push @{$session{$cache_key}}, { - Id => $queue->Id, - Name => $queue->Name, - Description => $queue->Description, - }; - } - } -} -</%init> +</%INIT> diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage index a83cfaab7..65ed536d6 100644 --- a/rt/html/Elements/SelectResultsPerPage +++ b/rt/html/Elements/SelectResultsPerPage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,18 +45,17 @@ %# END BPS TAGGED BLOCK }}} %# TODO: Better default handling -<select name="<% $Name %>"> -% foreach my $value ( @values ) { -<option value="<% $value %>" <% $value == $Default? 'selected': '' %>> +<SELECT NAME ="<%$Name%>"> +% foreach my $value (@values) { +<OPTION VALUE="<%$value%>" <% $value == $Default && 'SELECTED' %>> <% shift @labels %> -</option> +</OPTION> % } -</select> +</SELECT> <%INIT> my @values = qw(0 10 25 50 100); my @labels = (loc('Unlimited'), qw(10 25 50 100)); -$Default = 50 unless defined $Default; </%INIT> <%ARGS> diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder index 2a2771777..f6dd70ded 100644 --- a/rt/html/Elements/SelectSortOrder +++ b/rt/html/Elements/SelectSortOrder @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,13 +43,13 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> +<SELECT NAME="<%$Name%>"> %foreach my $order (@orders) { -<option value="<%$order%>" <%$order eq $Default && 'SELECTED' %>> +<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>> <% shift @order_names %> -</option> +</OPTION> % } -</select> +</SELECT> <%INIT> my @orders = qw (ASC DESC); diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus index 5f861af4f..fa76a3e5d 100644 --- a/rt/html/Elements/SelectStatus +++ b/rt/html/Elements/SelectStatus @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,15 +43,15 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> +<SELECT NAME ="<%$Name%>"> %if ($DefaultValue) { -<option <% !$Default && "SELECTED" %> value=""><%$DefaultLabel%></option> +<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION> %} %foreach my $status (@status) { %next if ($SkipDeleted && $status eq 'deleted'); -<option <% ($status eq $Default) && "SELECTED" %> value="<%$status%>"><%loc($status)%></option> +<OPTION <% ($status eq $Default) && "SELECTED" %> VALUE="<%$status%>"><%loc($status)%></OPTION> % } -</select> +</SELECT> <%ONCE> my $queue = new RT::Queue($session{'CurrentUser'}); my @status = $queue->StatusArray(); diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy index aca98f878..3e05dcce9 100644 --- a/rt/html/Elements/SelectTicketSortBy +++ b/rt/html/Elements/SelectTicketSortBy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,11 +43,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> +<SELECT NAME="<%$Name%>"> % foreach my $field (@sortfields) { -<option value="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></option> +<OPTION VALUE="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></OPTION> % } -</select> +</SELECT> <%INIT> my $tickets = new RT::Tickets($session{'CurrentUser'}); diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes index 5bacccf6c..a905f6067 100644 --- a/rt/html/Elements/SelectTicketTypes +++ b/rt/html/Elements/SelectTicketTypes @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,11 +43,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> +<SELECT NAME="<%$Name%>"> %foreach (@Types) { -<option value="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&> +<OPTION VALUE="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&> %} -</select> +</SELECT> <%ARGS> $Name => 'TickType' diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers index 52febb837..dfe816e49 100644 --- a/rt/html/Elements/SelectUsers +++ b/rt/html/Elements/SelectUsers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,14 +45,14 @@ %# END BPS TAGGED BLOCK }}} <select name="UserField"> % foreach my $col (RT::User->BasicColumns) { -<option value="<% $col->[0] %>"><% loc($col->[1]) %></option> +<option value="<% $col->[0] %>"><% loc($col->[1]) %> % } % while (my $CF = $CFs->Next) { -<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option> +<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %> % } </select> <& /Elements/SelectMatch, Name=> 'UserOp' &> -<input size="8" name="UserString" /> +<input size=8 name="UserString"> <%INIT> my $CFs = RT::CustomFields->new($session{'CurrentUser'}); $CFs->LimitToChildType('RT::User'); diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType index 26854a782..6ba9c7aa0 100644 --- a/rt/html/Elements/SelectWatcherType +++ b/rt/html/Elements/SelectWatcherType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,14 +43,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select NAME ="<%$Name%>"> +<SELECT NAME ="<%$Name%>"> % if ($AllowNull) { -<option value="">-</option> +<OPTION VALUE="">-</OPTION> % } %for my $option (@types) { -<option value="<%$option%>" <%defined($Default) && $option eq $Default && "SELECTED"%>><%loc($option)%></option> +<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><%loc($option)%></OPTION> %} -</select> +</SELECT> <%INIT> my @types; diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie index 087f8250e..bd7861355 100644 --- a/rt/html/Elements/SetupSessionCookie +++ b/rt/html/Elements/SetupSessionCookie @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -48,77 +46,69 @@ <%init> return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook -my %cookies = CGI::Cookie->fetch(); -my $cookiename = "RT_SID_" . $RT::rtname . "." . $ENV{'SERVER_PORT'}; -$SessionCookie ||= $cookies{$cookiename} ? $cookies{$cookiename}->value : undef; +my %cookies = CGI::Cookie->fetch(); +my $cookiename = "RT_SID_".$RT::rtname.".".$ENV{'SERVER_PORT'}; +my %backends = ( + mysql => 'Apache::Session::MySQL', + Pg => 'Apache::Session::Postgres', +# Oracle => 'Apache::Session::Oracle', +) unless $RT::WebSessionClass; +my $session_class = $RT::WebSessionClass || $backends{$RT::DatabaseType} || 'Apache::Session::File'; +my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm; -my %backends = ( - mysql => 'Apache::Session::MySQL', - Pg => 'Apache::Session::Postgres', - - # Oracle => 'Apache::Session::Oracle', -); - -my $session_class = $RT::WebSessionClass - || $backends{$RT::DatabaseType} - || 'Apache::Session::File'; -my $pm = "$session_class.pm"; -$pm =~ s|::|/|g; -require $pm; - -# morning bug avoidance attempt -- pdh 20030815 -unless ( $RT::Handle->dbh && $RT::Handle->dbh->ping ) { - $RT::Handle->Connect(); -} - -my $session_properties; -if ( $session_class eq 'Apache::Session::File' ) { - $session_properties = { - Directory => $RT::MasonSessionDir, - LockDirectory => $RT::MasonSessionDir, - }; -} else { - $session_properties = { - Handle => $RT::Handle->dbh, - LockHandle => $RT::Handle->dbh, - }; -} - -eval { - tie %session, $session_class, $SessionCookie, $session_properties -}; -if ($@) { - - # If the session is invalid, create a new session. + # morning bug avoidance attempt -- pdh 20030815 + unless ($RT::Handle->dbh && $RT::Handle->dbh->ping) { + $RT::Handle->Connect(); + } eval { - tie %session, $session_class, undef, $session_properties; - undef $cookies{$cookiename}; + tie %session, $session_class, + $SessionCookie || ( $cookies{$cookiename} ? $cookies{$cookiename}->value() : undef ), + $backends{$RT::DatabaseType} ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; }; -} + if ($@) { -if ($@) { - die loc("RT couldn't store your session.") . "\n" - . loc( - "This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.", - $RT::MasonSessionDir - ) - . "\n\n" - . $@; -} + # If the session is invalid, create a new session. + if ( $@ =~ /Object does not/i ) { + tie %session, $session_class, undef, $backends{$RT::DatabaseType} + ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } + : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; + undef $cookies{$cookiename}; + } + else { + die loc("RT couldn't store your session.") . "\n" + . loc( +"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.", + $RT::MasonSessionDir + ) + . "\n\n" + . $@; + } + } -if ( !$cookies{$cookiename} ) { - my $cookie = new CGI::Cookie( - -name => $cookiename, - -value => $session{_session_id}, - -path => $RT::WebPath, - -secure => ($RT::WebSecureCookies ? 1 :0) - ); - $r->headers_out->{'Set-Cookie'} = $cookie->as_string; + if ( !$cookies{$cookiename} ) { + my $cookie = new CGI::Cookie( + -name => $cookiename, + -value => $session{_session_id}, + -path => '/', + ); + $r->headers_out->{'Set-Cookie'} = $cookie->as_string; -} + } -return (); + return(); </%init> <%args> -$SessionCookie => undef +$SessionCookie => '' </%args> diff --git a/rt/html/Elements/ShowCustomFieldBinary b/rt/html/Elements/ShowCustomFieldBinary index 9dd5faaf1..ea9e5ae83 100644 --- a/rt/html/Elements/ShowCustomFieldBinary +++ b/rt/html/Elements/ShowCustomFieldBinary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/ShowCustomFieldImage b/rt/html/Elements/ShowCustomFieldImage index c49ae0ecf..7fa5e46d1 100644 --- a/rt/html/Elements/ShowCustomFieldImage +++ b/rt/html/Elements/ShowCustomFieldImage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,7 +45,7 @@ %# END BPS TAGGED BLOCK }}} % my $url = $RT::WebPath . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content; <a href="<% $url %>"><% $Object->Content %></a> -<img type="<% $Object->ContentType %>" height="64" src="<% $url %>" align="middle" /> +<img type="<% $Object->ContentType %>" height=64 src="<% $url %>" align="middle"> <%ARGS> $Object </%ARGS> diff --git a/rt/html/Elements/ShowCustomFieldWikitext b/rt/html/Elements/ShowCustomFieldWikitext index 1ddd7da1f..ab7c27b8b 100644 --- a/rt/html/Elements/ShowCustomFieldWikitext +++ b/rt/html/Elements/ShowCustomFieldWikitext @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,8 +45,7 @@ %# END BPS TAGGED BLOCK }}} % my $content = $Object->LargeContent || $Object->Content; % $content = $m->comp('/Elements/ScrubHTML', Content => $content); -% my $base = $Object->Object->WikiBase; -% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => $RT::WikiImplicitLinks, prefix => $base} ); +% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1 }); <%$wiki_content|n%> <%init> use Text::WikiFormat; diff --git a/rt/html/Elements/ShowCustomFields b/rt/html/Elements/ShowCustomFields index 06b599654..199fe3606 100644 --- a/rt/html/Elements/ShowCustomFields +++ b/rt/html/Elements/ShowCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,7 +47,7 @@ % while ( my $CustomField = $CustomFields->Next ) { % my $Values = $Object->CustomFieldValues( $CustomField->Id ); % my $count = $Values->Count; - <tr id="CF-<%$CustomField->id%>-ShowRow"> + <tr> <td class="label"><% $CustomField->Name %>:</td> <td class="value"> % unless ( $count ) { @@ -74,37 +72,12 @@ $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields', my $print_value = sub { my ($cf, $value) = @_; - my $linked = $cf->LinkValueTo; - if ( $linked ) { - $m->out('<a href="'. $value->LinkValueTo .'" target="_new">'); - } my $comp = "ShowCustomField". $cf->Type; - $m->comp('/Elements/Callback', - _CallbackName => 'ShowComponentName', - Name => \$comp, - CustomField => $cf, - Object => $Object - ); if ( $m->comp_exists( $comp ) ) { $m->comp( $comp, Object => $value ); } else { $m->print( $value->Content ); } - $m->out('</a>') if $linked; - - # This section automatically populates a div with the "IncludeContentForValue" for this custom - # field if it's been defined - if ( $cf->IncludeContentForValue ) { - my $vid = $value->id; - $m->out( '<div class="object_cf_value_include" id="object_cf_value_'. $vid .'">' ); - $m->print( loc("See also:") ); - $m->out( '<a href="'. $value->IncludeContentForValue .'">' ); - $m->print( $value->IncludeContentForValue ); - $m->out( qq{</a></div>\n} ); - $m->out( qq{<script><!--\nahah('} ); - $m->print( $value->IncludeContentForValue ); - $m->out( qq{', 'object_cf_value_$vid');\n--></script>\n} ); - } }; </%INIT> diff --git a/rt/html/Elements/ShowLink b/rt/html/Elements/ShowLink index a1d6bdf97..5929a968e 100644 --- a/rt/html/Elements/ShowLink +++ b/rt/html/Elements/ShowLink @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +43,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<a href="<%$URI->Resolver->HREF%>"> +<A href="<%$URI->Resolver->HREF%>"> % if ($URI->IsLocal) { % my $member = $URI->Object; % if (UNIVERSAL::isa($member, "RT::Ticket")) { diff --git a/rt/html/Elements/ShowLinks b/rt/html/Elements/ShowLinks index 913a4ee35..c9279a5db 100755 --- a/rt/html/Elements/ShowLinks +++ b/rt/html/Elements/ShowLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -95,7 +93,6 @@ <td class="value"> <ul> % while (my $Link = $Ticket->ReferredToBy->Next) { -% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder'); <li><& ShowLink, URI => $Link->BaseURI &> % } </ul> diff --git a/rt/html/Elements/ShowMemberships b/rt/html/Elements/ShowMemberships index f6b2817d7..3936d5080 100644 --- a/rt/html/Elements/ShowMemberships +++ b/rt/html/Elements/ShowMemberships @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit index ee3e8b6f6..9d8dca20f 100644 --- a/rt/html/Elements/Submit +++ b/rt/html/Elements/Submit @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,32 +43,54 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<div class="submit"> - <div class="extra-buttons"> +% if ($CheckAll or $ClearAll) { +<script><!-- +function set_checkbox (obj, val) { + var i; + var myfield = obj.form.getElementsByTagName('input'); + for (i = 0; i < myfield.length; i++) { + if (myfield[i].type == 'checkbox') { + myfield[i].checked = val; + } + } +} +--></script> +% } +<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 > +<TR> +<TD> % if ($CheckAll) { - <input type="button" value="<%$CheckAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', true);return false;" class="button" /> +<INPUT TYPE=BUTTON VALUE="<%$CheckAllLabel%>" ONCLICK="set_checkbox(this, true)"> % } % if ($ClearAll) { - <input type="button" value="<%$ClearAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', false);return false;" class="button" /> +<INPUT TYPE=BUTTON VALUE="<%$ClearAllLabel%>" ONCLICK="set_checkbox(this, false)"> % } % if ($Reset) { - <input type="reset" value="<%$ResetLabel%>" class="button" /> -% } - </div> - <div class="buttons"> +<INPUT TYPE=RESET VALUE="<%$ResetLabel%>"> +%} +</TD> +<TD> + +</TD> +<TD ALIGN=RIGHT VALIGN=CENTER><FONT COLOR=#ffd800> % if ($AlternateLabel) { - <span class="caption"><%$AlternateCaption%></span> - <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$AlternateLabel%>" class="button" /> -% } else { - <span class="caption"><%$Caption%></span> - <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$Label%>" class="button" /> +<B><%$AlternateCaption%> +<INPUT TYPE=SUBMIT +%if ($Name) { +NAME="<%$Name%>" +%} +VALUE='<%$AlternateLabel%>'></B> +% } +<B><%$Caption%> <INPUT TYPE=SUBMIT +%if ($Name) { +NAME="<%$Name%>" % } - </div> - <div class="submit-clear"></div> -</div> - + VALUE='<%$Label%>'></B></FONT> +</TD> +</TR> +</TABLE> <%ARGS> -$color => undef +$color => "#336699" $Caption => '' $AlternateCaption => undef $AlternateLabel => undef @@ -80,7 +100,6 @@ $CheckAll => undef $CheckAllLabel => loc('Check All') $ClearAll => undef $ClearAllLabel => loc('Clear All') -$CheckboxName => '' $Reset => undef $ResetLabel => loc('Reset') </%ARGS> diff --git a/rt/html/Elements/TitleBox b/rt/html/Elements/TitleBox index dfab9ea82..3c638e2d3 100644 --- a/rt/html/Elements/TitleBox +++ b/rt/html/Elements/TitleBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +43,4 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<%init> -# For compatibility with 3.4 -$m->comp('/Widgets/TitleBox', %ARGS ); -</%init> +<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&> diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd index 933d77000..d791e3a4f 100644 --- a/rt/html/Elements/TitleBoxEnd +++ b/rt/html/Elements/TitleBoxEnd @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +43,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<%init> -# For compatibility with 3.4 -$m->comp('/Widgets/TitleBoxEnd', %ARGS ); -</%init> + </TD> + </TR> +</TABLE> +% #Manually flush the content buffer after each titlebox is displayed +% $m->flush_buffer(); + +<%ARGS> +$title => undef +$content => undef +</%ARGS> + |