From a4185828bb55a5c55c8a1da1a8e319caf16e4478 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Thu, 2 May 2002 02:00:46 +0000 Subject: Bug 140770 - Navigation doesn't work after creating a new bug. This fix displays a new bug to the user immediately after it's been filed. Patch by gerv; r=justdave, afranke. --- post_bug.cgi | 10 +++++++-- template/en/default/bug/create/created.html.tmpl | 25 ++++------------------- template/en/default/bug/process/results.html.tmpl | 11 +++++----- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/post_bug.cgi b/post_bug.cgi index b6f7f5268..f66d13ee9 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -28,6 +28,7 @@ use strict; use lib qw(.); require "CGI.pl"; +require "bug_form.pl"; # Shut up misguided -w warnings about "used only once". For some reason, # "use vars" chokes on me when I try it here. @@ -302,9 +303,14 @@ $mailresults .= $_ while ; close(PMAIL); # Tell the user all about it -$vars->{'bug_id'} = $id; -$vars->{'mailresults'} = $mailresults; +$vars->{'id'} = $id; +$vars->{'mail'} = $mailresults; +$vars->{'type'} = "created"; print "Content-type: text/html\n\n"; $template->process("bug/create/created.html.tmpl", $vars) || ThrowTemplateError($template->error()); + +$::FORM{'id'} = $id; + +show_bug("header is already done"); diff --git a/template/en/default/bug/create/created.html.tmpl b/template/en/default/bug/create/created.html.tmpl index 7693fdbcf..0264413a7 100644 --- a/template/en/default/bug/create/created.html.tmpl +++ b/template/en/default/bug/create/created.html.tmpl @@ -20,28 +20,11 @@ #%] [% PROCESS global/header.html.tmpl - title = "Bug $bug_id Submitted" + title = "Bug $id Submitted" %] - - - - - -
-

Bug [% bug_id %] has been added to the database.

+[% PROCESS bug/process/results.html.tmpl %] - [% mailresults %] - -
- Back To Bug# [% bug_id %] -
+
-

- - Attach a file to this bug. -

- -[% PROCESS bug/navigate.html.tmpl %] - -[% PROCESS global/footer.html.tmpl %] +[%# post_bug.cgi will add a copy of the filed bug below here %] diff --git a/template/en/default/bug/process/results.html.tmpl b/template/en/default/bug/process/results.html.tmpl index 255a7c2ff..99dfbc11d 100644 --- a/template/en/default/bug/process/results.html.tmpl +++ b/template/en/default/bug/process/results.html.tmpl @@ -31,17 +31,18 @@ [% title = { - 'bug' => "Changes submitted for bug" , - 'dupe' => "Duplicate notation added to bug" , - 'dep' => "Checking for dependency changes on bug" , - 'votes' => "Confirmed by number of votes: bug" , + 'bug' => "Changes submitted for bug $id" , + 'dupe' => "Duplicate notation added to bug $id" , + 'dep' => "Checking for dependency changes on bug $id" , + 'votes' => "Bug $id confirmed by number of votes" , + 'created' => "Bug $id has been added to the database" , } %]
-

[% title.$type %] [%+ id %]

+

[% title.$type %]

[% mail %]
-- cgit v1.2.3-24-g4f1b