diff options
author | 2008-01-28 05:14:14 +0000 | |
---|---|---|
committer | 2008-01-28 05:14:14 +0000 | |
commit | c87cca60cfe149bf4ffe7ed1746189b936e87bac (patch) | |
tree | 0881e18732fa8baea267bf85cb94f8b2370141a1 /editflagtypes.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 'editflagtypes.cgi')
-rwxr-xr-x | editflagtypes.cgi | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 47eac753e..4117c91e8 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -332,15 +332,17 @@ sub insert { $dbh->bz_commit_transaction(); - $vars->{'name'} = $cgi->param('name'); + $vars->{'name'} = $name; $vars->{'message'} = "flag_type_created"; delete_token($token); + $vars->{'bug_types'} = Bugzilla::FlagType::match({'target_type' => 'bug'}); + $vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'}); + # Return the appropriate HTTP response headers. print $cgi->header(); - # Generate and return the UI (HTML page) from the appropriate template. - $template->process("global/message.html.tmpl", $vars) + $template->process("admin/flag-type/list.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -427,15 +429,17 @@ sub update { undef, $id); } - $vars->{'name'} = $cgi->param('name'); + $vars->{'name'} = $name; $vars->{'message'} = "flag_type_changes_saved"; delete_token($token); + $vars->{'bug_types'} = Bugzilla::FlagType::match({'target_type' => 'bug'}); + $vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'}); + # Return the appropriate HTTP response headers. print $cgi->header(); - # Generate and return the UI (HTML page) from the appropriate template. - $template->process("global/message.html.tmpl", $vars) + $template->process("admin/flag-type/list.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -484,11 +488,13 @@ sub deleteType { $vars->{'message'} = "flag_type_deleted"; delete_token($token); + $vars->{'bug_types'} = Bugzilla::FlagType::match({'target_type' => 'bug'}); + $vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'}); + # Return the appropriate HTTP response headers. print $cgi->header(); - # Generate and return the UI (HTML page) from the appropriate template. - $template->process("global/message.html.tmpl", $vars) + $template->process("admin/flag-type/list.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -509,11 +515,14 @@ sub deactivate { $vars->{'flag_type'} = $flag_type; delete_token($token); + $vars->{'bug_types'} = Bugzilla::FlagType::match({'target_type' => 'bug'}); + $vars->{'attachment_types'} = Bugzilla::FlagType::match({'target_type' => 'attachment'}); + # Return the appropriate HTTP response headers. print $cgi->header(); # Generate and return the UI (HTML page) from the appropriate template. - $template->process("global/message.html.tmpl", $vars) + $template->process("admin/flag-type/list.html.tmpl", $vars) || ThrowTemplateError($template->error()); } |