summaryrefslogtreecommitdiff
path: root/rt/share/html
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-01-07 13:33:21 -0500
committerChristopher Burger <burgerc@freeside.biz>2019-01-07 13:33:21 -0500
commita2885e497c74fc2f85055df86d6978db2a8aac77 (patch)
tree648e4c7b58e83bf3cc94d30a2ee9275454c3df3e /rt/share/html
parent236f5573c4210299bf05561c699295ae3da8d73e (diff)
RT# 35259 - Added option to attach a file thru quick ticket creation
Diffstat (limited to 'rt/share/html')
-rw-r--r--rt/share/html/Elements/QuickCreate3
-rwxr-xr-xrt/share/html/index.html19
2 files changed, 15 insertions, 7 deletions
diff --git a/rt/share/html/Elements/QuickCreate b/rt/share/html/Elements/QuickCreate
index d424e4f..e4c57cf 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 acf6c12..86cc8fc 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."));
@@ -106,13 +109,15 @@ 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'},
- Content => $ARGS{'Content'},
- Subject => $ARGS{'Subject'});
+ Queue => $ARGS{'Queue'},
+ Owner => $ARGS{'Owner'},
+ Status => $ARGS{'Status'},
+ # yes! it's Requestors, not Requestor
+ Requestors => $ARGS{'Requestors'},
+ Content => $ARGS{'Content'},
+ Subject => $ARGS{'Subject'},
+ Token => $ARGS{'Token'},
+ );
push @results, $msg;
if ( $t && $t->Id ) {