summaryrefslogtreecommitdiffstats
path: root/editkeywords.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-01-28 06:14:14 +0100
committerlpsolit%gmail.com <>2008-01-28 06:14:14 +0100
commitc87cca60cfe149bf4ffe7ed1746189b936e87bac (patch)
tree0881e18732fa8baea267bf85cb94f8b2370141a1 /editkeywords.cgi
parent132fcaa16d4035e3551a75c63d4de23dc11bb835 (diff)
downloadbugzilla-c87cca60cfe149bf4ffe7ed1746189b936e87bac.tar.gz
bugzilla-c87cca60cfe149bf4ffe7ed1746189b936e87bac.tar.xz
Bug 325487: Admin pages should require less "clicks" (remove useless confirmation pages) - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave r=mkanat a=LpSolit
Diffstat (limited to 'editkeywords.cgi')
-rwxr-xr-xeditkeywords.cgi22
1 files changed, 14 insertions, 8 deletions
diff --git a/editkeywords.cgi b/editkeywords.cgi
index 7ded21471..1e5d77296 100755
--- a/editkeywords.cgi
+++ b/editkeywords.cgi
@@ -92,14 +92,15 @@ if ($action eq 'new') {
print $cgi->header();
+ $vars->{'message'} = 'keyword_created';
$vars->{'name'} = $keyword->name;
- $template->process("admin/keywords/created.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+ $vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
+ $template->process("admin/keywords/list.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
exit;
}
-
#
# action='edit' -> present the edit keywords from
@@ -132,16 +133,19 @@ if ($action eq 'update') {
$keyword->set_name($cgi->param('name'));
$keyword->set_description($cgi->param('description'));
- $keyword->update();
+ my $changes = $keyword->update();
delete_token($token);
print $cgi->header();
+ $vars->{'message'} = 'keyword_updated';
$vars->{'keyword'} = $keyword;
- $template->process("admin/keywords/rebuild-cache.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+ $vars->{'changes'} = $changes;
+ $vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
+ $template->process("admin/keywords/list.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
exit;
}
@@ -173,9 +177,11 @@ if ($action eq 'delete') {
print $cgi->header();
- $template->process("admin/keywords/rebuild-cache.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+ $vars->{'message'} = 'keyword_deleted';
+ $vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
+ $template->process("admin/keywords/list.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
exit;
}