summaryrefslogtreecommitdiffstats
path: root/editflagtypes.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 /editflagtypes.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 'editflagtypes.cgi')
-rwxr-xr-xeditflagtypes.cgi27
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());
}