[freeside-commits] branch FREESIDE_3_BRANCH updated. ad6474af65a9894684bd5e8553e25d9e71f52bb2

Christopher Burger burgerc at freeside.biz
Mon Jan 7 12:50:53 PST 2019


The branch, FREESIDE_3_BRANCH has been updated
       via  ad6474af65a9894684bd5e8553e25d9e71f52bb2 (commit)
      from  b0ef27c471c45bcd4a1f07aac0b0f50ecf50a8c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ad6474af65a9894684bd5e8553e25d9e71f52bb2
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Jan 7 13:33:21 2019 -0500

    RT# 35259 - Added option to attach a file thru quick ticket creation
    
    Conflicts:
            rt/share/html/index.html

diff --git a/rt/share/html/Elements/QuickCreate b/rt/share/html/Elements/QuickCreate
index fa03f2061..af8d84972 100644
--- a/rt/share/html/Elements/QuickCreate
+++ b/rt/share/html/Elements/QuickCreate
@@ -45,10 +45,12 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+% my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 <div class="quick-create">
 <&| /Widgets/TitleBox, title => loc('Quick ticket creation') &>
 <form
     method="post"
+    enctype="multipart/form-data"
     action="<%RT->Config->Get('WebPath')%>/index.html"
 % $m->callback(CallbackName => 'InFormElement');
 >
@@ -74,6 +76,7 @@
 <tr class="input-row">
 <td class="labeltop"><&|/l&>Content</&>:</td>
 <td colspan="3" class="value"><textarea name="Content" cols="50" rows="3"><% $args->{Content} || ''%></textarea></td></tr>
+<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
 </table>
 <& /Elements/Submit, Label => loc('Create') &>
 </form>
diff --git a/rt/share/html/index.html b/rt/share/html/index.html
index fafba1cb5..b635f3c9a 100755
--- a/rt/share/html/index.html
+++ b/rt/share/html/index.html
@@ -90,6 +90,9 @@ $m->callback( ARGSRef => \%ARGS, results => \@results, CallbackName => 'Initial'
               skip_create => \$skip_create );
 
 if ( $ARGS{'QuickCreate'} ) {
+
+    ProcessAttachments(ARGSRef => \%ARGS);
+
     my $QueueObj = RT::Queue->new($session{'CurrentUser'});
     $QueueObj->Load($ARGS{Queue}) or Abort(loc("Queue could not be loaded."));
     
@@ -105,14 +108,16 @@ if ( $ARGS{'QuickCreate'} ) {
     my $created;
     if ( $ValidCFs && !$skip_create ) {
         my ($t, $msg) = CreateTicket( 
-                        Queue => $ARGS{'Queue'},
-                        Owner => $ARGS{'Owner'},
-                        Status => $ARGS{'Status'},
-                        # yes! it's Requestors, not Requestor
-                        Requestors => $ARGS{'Requestors'},
-                        From => $session{'CurrentUser'}->EmailAddress,
-                        Content => $ARGS{'Content'},
-                        Subject => $ARGS{'Subject'});
+                          Queue => $ARGS{'Queue'},
+                          Owner => $ARGS{'Owner'},
+                          Status => $ARGS{'Status'},
+                          # yes! it's Requestors, not Requestor
+                          Requestors => $ARGS{'Requestors'},
+                          From => $session{'CurrentUser'}->EmailAddress,
+                          Content => $ARGS{'Content'},
+                          Subject => $ARGS{'Subject'},
+                          Attachments => delete $session{'Attachments'},
+                        );
         if ( $t && $t->Id && RT->Config->Get('DisplayAfterQuickCreate', $session{'CurrentUser'}) ) {
           RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Ticket/Display.html?id=". $t->Id);
         } else {

-----------------------------------------------------------------------

Summary of changes:
 rt/share/html/Elements/QuickCreate |  3 +++
 rt/share/html/index.html           | 21 +++++++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list