summaryrefslogtreecommitdiffstats
path: root/editversions.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 /editversions.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 'editversions.cgi')
-rwxr-xr-xeditversions.cgi31
1 files changed, 7 insertions, 24 deletions
diff --git a/editversions.cgi b/editversions.cgi
index 06a58ea03..85f4f8ca4 100755
--- a/editversions.cgi
+++ b/editversions.cgi
@@ -22,11 +22,6 @@
# Terry Weissman <terry@mozilla.org>
# Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
-#
-#
-# Direct any questions on this source code to
-#
-# Holger Schurig <holgerschurig@nikocity.de>
use strict;
use lib qw(. lib);
@@ -103,9 +98,6 @@ unless ($action) {
exit;
}
-
-
-
#
# action='add' -> present form for parameters for new version
#
@@ -121,8 +113,6 @@ if ($action eq 'add') {
exit;
}
-
-
#
# action='new' -> add version entered in the 'action=add' screen
#
@@ -132,17 +122,15 @@ if ($action eq 'new') {
my $version = Bugzilla::Version::create($version_name, $product);
delete_token($token);
+ $vars->{'message'} = 'version_created';
$vars->{'version'} = $version;
$vars->{'product'} = $product;
- $template->process("admin/versions/created.html.tmpl", $vars)
+ $template->process("admin/versions/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
-
-
-
#
# action='del' -> ask if user really wants to delete
#
@@ -161,8 +149,6 @@ if ($action eq 'del') {
exit;
}
-
-
#
# action='delete' -> really delete the version
#
@@ -174,17 +160,17 @@ if ($action eq 'delete') {
$version->remove_from_db;
delete_token($token);
+ $vars->{'message'} = 'version_deleted';
$vars->{'version'} = $version;
$vars->{'product'} = $product;
+ $vars->{'no_edit_version_link'} = 1;
- $template->process("admin/versions/deleted.html.tmpl", $vars)
+ $template->process("admin/versions/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
-
-
#
# action='edit' -> present the edit version form
#
@@ -204,8 +190,6 @@ if ($action eq 'edit') {
exit;
}
-
-
#
# action='update' -> update the version
#
@@ -223,16 +207,15 @@ if ($action eq 'update') {
$dbh->bz_commit_transaction();
delete_token($token);
+ $vars->{'message'} = 'version_updated';
$vars->{'version'} = $version;
$vars->{'product'} = $product;
- $template->process("admin/versions/updated.html.tmpl", $vars)
+ $template->process("admin/versions/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
-
-
#
# No valid action found
#