X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FQueues%2FTemplate.html;h=0d51cab5f0bdda5dff08c5ef691f37225a5d4886;hb=de9d037528895f7151a9aead6724ce2df95f9586;hp=3dd99e1d7252f408a266d88896293249de484ea9;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6;p=freeside.git diff --git a/rt/share/html/Admin/Queues/Template.html b/rt/share/html/Admin/Queues/Template.html index 3dd99e1d7..0d51cab5f 100755 --- a/rt/share/html/Admin/Queues/Template.html +++ b/rt/share/html/Admin/Queues/Template.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -59,10 +59,10 @@ %# hang onto the queue id <& /Admin/Elements/ModifyTemplate, - Name => $TemplateObj->Name, - Description => $TemplateObj->Description, - Content => $TemplateObj->Content, - Type => $TemplateObj->Type + Name => $TemplateObj->Name // $ARGS{Name}, + Description => $TemplateObj->Description // $ARGS{Description}, + Content => $TemplateObj->Content // $ARGS{Content}, + Type => $TemplateObj->Type // $ARGS{Type}, &> <& /Elements/Submit, Label => $SubmitLabel, Reset => 1 &> @@ -79,8 +79,7 @@ my @results; if ( !$Create ) { if ( $Template eq 'new' ) { my ( $val, $msg ) - = $TemplateObj->Create( Queue => $Queue, Name => $Name ); - Abort( loc( "Could not create template: [_1]", $msg ) ) unless ($val); + = $TemplateObj->Create( Queue => $Queue, Name => $Name, Type => $Type ); push @results, $msg; } else { $TemplateObj->Load($Template) || Abort( loc('No Template') ); @@ -92,7 +91,7 @@ if ( $TemplateObj->Id() ) { $Queue = $TemplateObj->Queue; $QueueObj = $TemplateObj->QueueObj; - my @attribs = qw( Description Content Queue Name Type ); + my @attribs = qw( Name Description Queue Type Content ); my @aresults = UpdateRecordObject( AttributesRef => \@attribs, Object => $TemplateObj, ARGSRef => \%ARGS @@ -102,6 +101,7 @@ if ( $TemplateObj->Id() ) { my ( $ok, $msg ) = $TemplateObj->CompileCheck; push @results, $msg if !$ok; } else { + $Create = 1; $QueueObj = RT::Queue->new( $session{'CurrentUser'} ); $QueueObj->Load($Queue); } @@ -121,4 +121,5 @@ $Queue => '' $Template => '' $Create => undef $Name => undef +$Type => undef