RT 4.0.19
[freeside.git] / rt / share / html / SelfService / Create.html
index 56ef79f..189595f 100755 (executable)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 <form action="Create.html" method="post" enctype="multipart/form-data">
 <input type="hidden" class="hidden" name="id" value="new" />
 
-<table>
+<table width="100%">
 <tr>
 <td class="label">
 <&|/l&>Queue</&>:
 </td>
 <td class="value">
     <input type="hidden" class="hidden" name="Queue" value="<%$queue_obj->id || ''%>" />
-    <strong><%$queue_obj->Name || ''%></strong> (<%$queue_obj->Description || ''%>)
+    <strong><%$queue_obj->Name || ''%></strong> <% $queue_obj->Description ? '('.$queue_obj->Description.')' : '' %>
 </td>
 </tr>
 <% $m->callback( CallbackName => 'AfterQueue', %ARGS, QueueObj => $queue_obj ) %>
         <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $queue_obj &>
     </td>
 </tr>
-<tr>
-<td class="label">
-%# FIXME: if failed customfields validation, attachement needs to be choosen
-%# again by user.
-<&|/l&>Attach file</&>:
-</td>
-<td class="value">
-<input name="Attach" type="file" />
-</td>
-</tr>
+<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $queue_obj &>
 </table>
 <table width="100%">
 <tr>
@@ -128,10 +119,12 @@ my $ValidCFs = $m->comp(
     ARGSRef => \%ARGS
 );
 
+ProcessAttachments(ARGSRef => \%ARGS);
+
 my $skip_create = 0;
 $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create, results => \@results );
 
-if ( defined($ARGS{'id'}) and $ARGS{'id'} eq 'new' ) { # new ticket?
+if ( !exists $ARGS{'AddMoreAttach'} and defined($ARGS{'id'}) and $ARGS{'id'} eq 'new' ) { # new ticket?
     if ( $ValidCFs && !$skip_create ) {
         $m->comp('Display.html', %ARGS);
         $RT::Logger->crit("After display call; error is $@");