-my $subtabs = {
- A => { title => loc('Select'),
- path => "Admin/Global/Templates.html"
- },
- B => { title => loc('New'),
- path => "Admin/Global/Template.html?Create=1&Queue=0",
- separator => 1,
- }
- };
-
-if ($Create) {
- $title = loc("Create a template");
- $current_subtab = "Admin/Global/Template.html?Create=1&Queue=0";
- $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;
- }
- else {
- $TemplateObj->Load($Template) || Abort(loc('No Template'));
+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'));