diff options
Diffstat (limited to 'rt/html/Ticket/Create.html')
-rw-r--r-- | rt/html/Ticket/Create.html | 338 |
1 files changed, 153 insertions, 185 deletions
diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index c23a302b7..fc4cc20ef 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.html @@ -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,214 +43,203 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, - Title => loc("Create a new ticket"), - onload => "hide(document.getElementById('Ticket-Create-details'));" &> +<& /Elements/Header, Title => loc("Create a new ticket") &> <& /Elements/Tabs, current_toptab => "Ticket/Create.html", - Title => loc("Create a new ticket"), - actions => $actions &> -<& /Elements/ListActions, actions => \@results &> -<form action="<%$RT::WebPath%>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate"> -<input type="hidden" class="hidden" name="id" value="new" /> -<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> - -<div id="Ticket-Create-basics"> -<a name="basics"></a> -<&| /Widgets/TitleBox, title => loc("Create a new ticket") &> -<table border="0" cellpadding="0" cellspacing="0"> -<tr><td class="label"><&|/l&>Queue</&>:</td> -<td class="value"><% $QueueObj->Name %> -<input type="hidden" class="hidden" name="Queue" value="<%$QueueObj->Name%>" /> -</td> -<td class="label"><&|/l&>Status</&>: -</td> -<td class="value"> + Title => loc("Create a new ticket") &> +<FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data" NAME="TicketCreate"> +<INPUT TYPE=HIDDEN Name="id" VALUE="new"> +<A NAME="top"> + + +[<a class="currenttab"><&|/l&>Show basics</&></a>] [<A HREF="#detail"><&|/l&>Show details</&></a>] +<BR> +<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &> +<TABLE border=0 cellpadding=0 cellspacing=0> +<TR><TD class=label><&|/l&>Queue</&>:</TD> +<TD class=value><% $QueueObj->Name %> +<INPUT TYPE=HIDDEN NAME=Queue Value="<%$QueueObj->Name%>"> +</TD> +<TD class=label><&|/l&>Status</&>: +</TD> +<TD class=value> <& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new', DefaultValue => 0 &> -</td> -<td class="label"> +</TD> +<TD class=label> <&|/l&>Owner</&>: -</td> -<td class="value"> +</TD> +<TD class=value> <& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &> -</td> -</tr> -<tr> -<td class="label"> +</TD> +</TR> +<TR> +<TD class=label> <&|/l&>Requestors</&>: -</td> -<td class="value" colspan="5"> -<input name="Requestors" value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" size="40" /> -</td> -</tr> -<tr> -<td class="labeltop"> +</TD> +<TD class=value COLSPAN=5> +<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" SIZE=40> +</TD> +</TR> +<TR> +<TD class=labeltop> <&|/l&>Cc</&>: -</td> -<td class="value" colspan="5"> -<input name="Cc" size="40" value="<% $ARGS{Cc} %>" /><br /> -<i><font size="-2"> -<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <strong>will</strong> receive future updates.)</&></font></i> -</td> -</tr> -<tr> -<td class="labeltop"> +</TD> +<TD class=value COLSPAN=5> +<INPUT NAME="Cc" SIZE=40 VALUE="<% $ARGS{Cc} %>"><BR> +<i><font size=-2> +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></font></i> +</TD> +</TR> +<TR> +<TD class=labeltop> <&|/l&>Admin Cc</&>: -</td> -<td class="value" colspan="5"> -<input name="AdminCc" size="40" value="<% $ARGS{AdminCc} %>" /><br /> -<i><font size="-2"> -<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <strong>will</strong> receive future updates.)</&></font></i> -</td> -</tr> -<tr> -<td class="label"> +</TD> +<TD class=value COLSPAN=5> +<INPUT NAME="AdminCc" SIZE=40 VALUE="<% $ARGS{AdminCc} %>"><BR> +<i><font size=-2> +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></font></i> +</TD> +</TR> +<TR> +<TD class=label> <&|/l&>Subject</&>: -</td> -<td class="value" colspan="5"> -<input name="Subject" size="60" maxsize="200" value="<%$ARGS{Subject} || ''%>" /> -</td> -</tr> -<tr> -<td colspan="6"> +</TD> +<TD class=value COLSPAN=5> +<INPUT Name="Subject" SIZE=60 MAXSIZE=200 value="<%$ARGS{Subject} || ''%>"> +</TD> +</TR> +<TR> +<TD COLSPAN=6> <& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &> -</td> -</tr> +</TD> +</TR> % if ($TxnCFs->Count) { % while (my $CF = $TxnCFs->Next()) { -<tr> -<td align="right"><% $CF->Name %>:</td> -<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix => - "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td> -</td></tr> +<TR> +<TD ALIGN=RIGHT><% $CF->Name %>:</TD> +<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix => + "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD> +</TD></TR> % } % } -<tr> +<TR> % if (exists $session{'Attachments'}) { -<td class="label"> +<TD class=label> <&|/l&>Attached file</&>: -</td> -<td colspan="5"> -<&|/l&>Check box to delete</&><br /> +</TD> +<TD COLSPAN=5> +<&|/l&>Check box to delete</&><BR> % foreach my $attach_name (keys %{$session{'Attachments'}}) { -<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br /> +<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR> % } # end of foreach -</td> -</tr> -<tr> +</TD> +</TR> +<TR> % } # end of if -<td> +<TD> <&|/l&>Attach file</&>: -</td> -<td class="value" colspan="5"> -<input type="file" name="Attach" /> -<input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" /> -</td> -</tr> -<tr> -<td colspan="6"> -<&|/l&>Describe the issue below</&>:<br /> +</TD> +<TD class=value COLSPAN=5> +<INPUT TYPE=FILE NAME="Attach"> +<INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>"> +</TD> +</TR> +<TR> +<TD COLSPAN=6> +<&|/l&>Describe the issue below</&>:<br> % if (exists $ARGS{Content}) { <& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &> % } else { <& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &> %} -<br /> -</td> -</tr> -<tr> -<td align="right" colspan="2"> -</td> -</tr> -</table> -</&> +<BR> +</TD> +</TR> +<TR> +<TD ALIGN=RIGHT COLSPAN=2> +</TD> +</TR> +</TABLE> +<& /Elements/TitleBoxEnd &> <& /Elements/Submit, Label => loc("Create")&> -</div> -<div id="Ticket-Create-details"> -<a name="details"></a> -<table width="100%" border="0"> -<tr> -<td width="50%" valign="top"> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> + +<A NAME="detail"> + [<A HREF="#top"><&|/l&>Show basics</&></a>] [<a class="currenttab"><&|/l&>Show details</&></a>] +<BR> +<TABLE WIDTH="100%" BORDER=0> +<TR> +<TD WIDTH="50%" VALIGN=TOP> - <&| /Widgets/TitleBox, title => loc('The Basics'), + <& /Elements/TitleBoxStart, title => loc('The Basics'), title_class=> 'inverse', color => "#993333" &> -<table border="0"> -<tr><td align="right"><&|/l&>Priority</&>:</td><td><input size="3" name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>" /></td></tr> -<tr><td align="right"><&|/l&>Final Priority</&>:</td><td><input size="3" name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>" /></td></tr> -<tr><td align="right"><&|/l&>Time Estimated</&>:</td> -<td> -<input size="3" name="TimeEstimated" value="<%$ARGS{TimeEstimated}%>" /> -<& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &> - -</td></tr> -<tr><td align="right"><&|/l&>Time Worked</&>:</td> -<td> -<input size="3" name="TimeWorked" value="<%$ARGS{TimeWorked}%>" /> -<& /Elements/SelectTimeUnits, Name =>'TimeWorked' &> - -</td></tr> -<tr> -<td align="right"><&|/l&>Time Left</&>:</td> -<td><input size="3" name="TimeLeft" value="<%$ARGS{TimeLeft}%>" /> -<& /Elements/SelectTimeUnits, Name =>'TimeLeft' &> -</td></tr> -</table> -</&> -<br /> -<&|/Widgets/TitleBox, title => loc("Dates"), +<TABLE BORDER=0> +<TR><TD ALIGN=RIGHT><&|/l&>Priority</&>:</TD><TD><input size=3 name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Final Priority</&>:</TD><TD><input size=3 name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Time Worked</&>:</TD><TD><&|/l,'<input size=3 name="TimeWorked" value="'.$ARGS{TimeWorked}.'">'&>[_1] min</&></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Time Left</&>:</TD><TD><&|/l,'<input size=3 name="TimeLeft" value="'.$ARGS{TimeLeft}.'">'&>[_1] min</&></TD></TR> +</TABLE> +<& /Elements/TitleBoxEnd &> +<br> +<& /Elements/TitleBoxStart, title => loc("Dates"), title_class=> 'inverse', color => "#663366" &> -<table> -<tr><td class="label"><&|/l&>Starts</&>:</td><td><& /Elements/SelectDate, Name => "Starts", Default => $ARGS{Starts} || '' &></td></tr> -<tr><td class="label"><&|/l&>Due</&>:</td><td><& /Elements/SelectDate, Name => "Due", Default => $ARGS{Due} || '' &></td></tr> -</table> -</&> -<br /> -</td> +<TABLE BORDER=0> +<TR><TD ALIGN=RIGHT><&|/l&>Starts</&>:</TD><TD><input size=10 name="Starts" value="<% $ARGS{Starts} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Due</&>:</TD><TD><input size=10 name="Due" value="<% +$ARGS{Due}%>"></TD></TR> +</TABLE> +<& /Elements/TitleBoxEnd &> +<BR> +</TD> -<td valign="top"> -<&| /Widgets/TitleBox, title => loc('Links'), title_class=> 'inverse' &> +<TD VALIGN="TOP"> +<& /Elements/TitleBoxStart, title => loc('Links'), + title_class=> 'inverse', + titleright => '', color=> "#336633" &> -<em><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></em> -<table border="0"> -<tr><td align="right"><&|/l&>Depends on</&></td><td><input size="10" name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>" /></td></tr> -<tr><td align="right"><&|/l&>Depended on by</&></td><td><input size="10" name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>" /></td></tr> -<tr><td align="right"><&|/l&>Parents</&></td><td><input size="10" name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>" /></td></tr> -<tr><td align="right"><&|/l&>Children</&></td><td><input size="10" name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>" /></td></tr> -<tr><td align="right"><&|/l&>Refers to</&></td><td><input size="10" name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>" /></td></tr> -<tr><td align="right"><&|/l&>Referred to by</&></td><td><input size="10" name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>" /></td></tr> +<i><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></i> +<TABLE BORDER=0> +<TR><TD ALIGN=RIGHT><&|/l&>Depends on</&></TD><TD><input size=10 name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Depended on by</&></TD><TD><input size=10 name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Parents</&></TD><TD><input size=10 name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Children</&></TD><TD><input size=10 name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Refers to</&></TD><TD><input size=10 name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Referred to by</&></TD><TD><input size=10 name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>"></TD></TR> -</table> -</&> -<br /> +</TABLE> +<& /Elements/TitleBoxEnd &> +<BR> -</td> -</tr> -</table> +</TD> +</TR> +</TABLE> <& /Elements/Submit, Label => loc("Create") &> -</div> -</form> +</FORM> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <%INIT> -my @results; + my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded.")); my $CFs = $QueueObj->TicketCustomFields(); my $TxnCFs = $QueueObj->TicketTransactionCustomFields(); -my $ValidCFs = $m->comp( - '/Elements/ValidateCustomFields', - CustomFields => $CFs, - ARGSRef => \%ARGS -); - # if no due date has been set explicitly, then use the # queue's default if it exists if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) { @@ -298,29 +285,10 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') { # }}} -if ((!exists $ARGS{'AddMoreAttach'}) and ($ARGS{'id'} eq 'new')) { # new ticket? - if ($ValidCFs) { - $m->comp('Display.html', %ARGS); - $RT::Logger->crit("After display call; error is $@"); - $m->abort(); - } - else { - # Invalid CFs - while (my $CF = $CFs->Next) { - my $msg = $m->notes('InvalidField-' . $CF->Id) or next; - push @results, $CF->Name . ': ' . $msg; - } - } +if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket? + $m->comp('Display.html', %ARGS); + return(); } - -my $actions = { - A => { - html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Show basics') . q[</a>], - }, - B => { - html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Show details') . q[</a>], - }, -}; </%INIT> <%ARGS> |