diff options
| author | Mark Wells <mark@freeside.biz> | 2013-08-22 17:14:01 -0700 | 
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2013-08-22 17:14:01 -0700 | 
| commit | 4c0066949409448d9104fd7f7c05ccff0573e2a8 (patch) | |
| tree | 7e846c5eb0d4394b6dbb3f327c77cd54957240dc /httemplate/misc | |
| parent | 8a8089a9580bece258da2c0852acfd2c53b49ff0 (diff) | |
better locale support in message template UI, #24659
Diffstat (limited to 'httemplate/misc')
| -rw-r--r-- | httemplate/misc/delete-template_content.html | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/httemplate/misc/delete-template_content.html b/httemplate/misc/delete-template_content.html new file mode 100644 index 000000000..e77878c25 --- /dev/null +++ b/httemplate/misc/delete-template_content.html @@ -0,0 +1,18 @@ +<%init> +die "access denied" +  unless $FS::CurrentUser::CurrentUser->access_right(['Edit templates', 'Edit global templates']); + +my ($msgnum, $locale); +$cgi->param('msgnum') =~ /^(\d+)$/ or die "bad msgnum"; +$msgnum = $1; +$cgi->param('locale') =~ /^(\w+)$/ or die "bad locale"; +$locale = $1; +my $content = qsearchs('template_content', +              { msgnum => $msgnum, locale => $locale }) +  or die "couldn't find $locale version of template #$msgnum"; + +my $error = $content->delete; +my $url = $p.'edit/msg_template.html?msgnum='.$msgnum; +$url .= ";locale=$locale;error=$error" if $error; +</%init> +<% $cgi->redirect($url) %> | 
