rt 4.0.23
[freeside.git] / rt / share / html / Ticket / Create.html
index 6d84b03..7a1619a 100755 (executable)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -53,6 +53,7 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<% RT->Config->Get('WebPath') %>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
+  <input type="submit" name="SubmitTicket" value="Create" style="display:none">
   <input type="hidden" class="hidden" name="id" value="new" />
   
 % $m->callback( CallbackName => 'FormStart', QueueObj => $QueueObj, ARGSRef => \%ARGS );
 
 % $m->callback( CallbackName => 'AfterOwner', ARGSRef => \%ARGS );
 
-      <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
-      <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
+      <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &>
+      <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &>
     </table>
   </&>
 % $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj, ARGSRef => \%ARGS );
@@ -337,8 +338,14 @@ if ($CloneTicket) {
         while ( my $cf_value = $cf_values->Next ) {
             push @cf_values, $cf_value->Content;
         }
-        $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n",
-            @cf_values;
+
+        if ( @cf_values > 1 && $cf->Type eq 'Select' ) {
+            $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = \@cf_values;
+        }
+        else {
+            $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n",
+              @cf_values;
+        }
     }
 
     # Pass customer links along (even though cloning of parent links