diff options
author | lpsolit%gmail.com <> | 2008-01-28 05:14:14 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-01-28 05:14:14 +0000 |
commit | c87cca60cfe149bf4ffe7ed1746189b936e87bac (patch) | |
tree | 0881e18732fa8baea267bf85cb94f8b2370141a1 /editkeywords.cgi | |
parent | Bug 410521: The diffs in bugmails were broken and BugMail.pm was throwing a w... (diff) | |
download | bugzilla-c87cca60cfe149bf4ffe7ed1746189b936e87bac.tar.gz bugzilla-c87cca60cfe149bf4ffe7ed1746189b936e87bac.tar.bz2 bugzilla-c87cca60cfe149bf4ffe7ed1746189b936e87bac.zip |
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-x | editkeywords.cgi | 22 |
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; } |