%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# hang onto the queue id
<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
<& /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 &>
</form>
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') );
$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
my ( $ok, $msg ) = $TemplateObj->CompileCheck;
push @results, $msg if !$ok;
} else {
+ $Create = 1;
$QueueObj = RT::Queue->new( $session{'CurrentUser'} );
$QueueObj->Load($Queue);
}
$Template => ''
$Create => undef
$Name => undef
+$Type => undef
</%ARGS>