From c87cca60cfe149bf4ffe7ed1746189b936e87bac Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 28 Jan 2008 05:14:14 +0000 Subject: Bug 325487: Admin pages should require less "clicks" (remove useless confirmation pages) - Patch by Frédéric Buclin r=justdave r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editversions.cgi | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'editversions.cgi') diff --git a/editversions.cgi b/editversions.cgi index 06a58ea03..85f4f8ca4 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -22,11 +22,6 @@ # Terry Weissman # Gavin Shelley # Frédéric Buclin -# -# -# Direct any questions on this source code to -# -# Holger Schurig 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 # -- cgit v1.2.3-24-g4f1b