-if ($Create) {
- $title = loc("Create a template");
- $SubmitLabel = loc('Create');
-}
-
-else {
- if (defined ($Template) && $Template eq 'new') {
- my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name);
- Abort(loc("Could not create template: [_1]", $msg)) unless ($val);
- push @results, $msg;
+if (!$Create) {
+ if (defined ($Template) && $Template eq 'new') {
+ my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name, Type => $Type);
+ push @results, $msg;
+ } else {
+ $TemplateObj->Load($Template) || Abort(loc('No Template'));