stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / misc / delete-template_content.html
1 <%init>
2 die "access denied"
3   unless $FS::CurrentUser::CurrentUser->access_right(['Edit templates', 'Edit global templates']);
4
5 my ($msgnum, $locale);
6 $cgi->param('msgnum') =~ /^(\d+)$/ or die "bad msgnum";
7 $msgnum = $1;
8 $cgi->param('locale') =~ /^(\w+)$/ or die "bad locale";
9 $locale = $1;
10 my $content = qsearchs('template_content',
11               { msgnum => $msgnum, locale => $locale })
12   or die "couldn't find $locale version of template #$msgnum";
13
14 my $error = $content->delete;
15 my $url = $p.'edit/msg_template.html?msgnum='.$msgnum;
16 $url .= ";locale=$locale;error=$error" if $error;
17 </%init>
18 <% $cgi->redirect($url) %>