Commit 6ef3e1dd authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 170903 - Remove hard-coded titles and things. Patch B. Patch by gerv; r=bbaetz.

parent 049825b2
...@@ -44,7 +44,6 @@ use vars qw($db_name ...@@ -44,7 +44,6 @@ use vars qw($db_name
@components @components
@default_column_list @default_column_list
$defaultqueryname $defaultqueryname
@dontchange
@legal_keywords @legal_keywords
@legal_platform @legal_platform
@legal_priority @legal_priority
...@@ -690,9 +689,6 @@ if ($dotweak) { ...@@ -690,9 +689,6 @@ if ($dotweak) {
$vars->{'severities'} = \@::legal_severity; $vars->{'severities'} = \@::legal_severity;
$vars->{'resolutions'} = \@::settable_resolution; $vars->{'resolutions'} = \@::settable_resolution;
# The value that represents "don't change the value of this field".
$vars->{'dontchange'} = $::dontchange;
$vars->{'unconfirmedstate'} = $::unconfirmedstate; $vars->{'unconfirmedstate'} = $::unconfirmedstate;
$vars->{'bugstatuses'} = [ keys %$bugstatuses ]; $vars->{'bugstatuses'} = [ keys %$bugstatuses ];
......
...@@ -38,11 +38,9 @@ use Bugzilla::Config qw(:DEFAULT ChmodDataFile); ...@@ -38,11 +38,9 @@ use Bugzilla::Config qw(:DEFAULT ChmodDataFile);
sub globals_pl_sillyness { sub globals_pl_sillyness {
my $zz; my $zz;
$zz = @main::SqlStateStack; $zz = @main::SqlStateStack;
$zz = @main::chooseone;
$zz = $main::contenttypes; $zz = $main::contenttypes;
$zz = @main::default_column_list; $zz = @main::default_column_list;
$zz = $main::defaultqueryname; $zz = $main::defaultqueryname;
$zz = @main::dontchange;
$zz = @main::enterable_products; $zz = @main::enterable_products;
$zz = %main::keywordsbyname; $zz = %main::keywordsbyname;
$zz = @main::legal_bug_status; $zz = @main::legal_bug_status;
...@@ -96,8 +94,6 @@ $::ENV{'PATH'} = ''; ...@@ -96,8 +94,6 @@ $::ENV{'PATH'} = '';
$::SIG{TERM} = 'IGNORE'; $::SIG{TERM} = 'IGNORE';
$::SIG{PIPE} = 'IGNORE'; $::SIG{PIPE} = 'IGNORE';
$::dontchange = "--do_not_change--";
$::chooseone = "--Choose_one:--";
$::defaultqueryname = "(Default query)"; # This string not exposed in UI $::defaultqueryname = "(Default query)"; # This string not exposed in UI
$::unconfirmedstate = "UNCONFIRMED"; $::unconfirmedstate = "UNCONFIRMED";
$::dbwritesallowed = 1; $::dbwritesallowed = 1;
......
...@@ -121,7 +121,7 @@ foreach my $field ("dependson", "blocked") { ...@@ -121,7 +121,7 @@ foreach my $field ("dependson", "blocked") {
###################################################################### ######################################################################
print "Content-type: text/html\n\n"; print "Content-type: text/html\n\n";
$vars->{'title'} = "Bug processed"; $vars->{'title_tag'} = "bug_processed";
# Set the title if we can see a mid-air coming. This test may have false # Set the title if we can see a mid-air coming. This test may have false
# negatives, but never false positives, and should catch the majority of cases. # negatives, but never false positives, and should catch the majority of cases.
...@@ -133,12 +133,12 @@ if (defined($::FORM{'id'})) { ...@@ -133,12 +133,12 @@ if (defined($::FORM{'id'})) {
if (defined $::FORM{'delta_ts'} && $delta_ts && if (defined $::FORM{'delta_ts'} && $delta_ts &&
$::FORM{'delta_ts'} ne $delta_ts) $::FORM{'delta_ts'} ne $delta_ts)
{ {
$vars->{'title'} = "Mid-air collision!"; $vars->{'title_tag'} = "mid_air";
} }
} }
# Start displaying the response page. # Start displaying the response page.
$template->process("global/header.html.tmpl", $vars) $template->process("bug/process/header.html.tmpl", $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
$vars->{'header_done'} = 1; $vars->{'header_done'} = 1;
...@@ -190,7 +190,7 @@ if ( $::FORM{'id'} ) { ...@@ -190,7 +190,7 @@ if ( $::FORM{'id'} ) {
$::oldproduct = FetchSQLData(); $::oldproduct = FetchSQLData();
} }
if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct) if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct)
|| (!$::FORM{'id'} && $::FORM{'product'} ne $::dontchange)) || (!$::FORM{'id'} && $::FORM{'product'} ne $::FORM{'dontchange'}))
&& CheckonComment( "reassignbycomponent" )) && CheckonComment( "reassignbycomponent" ))
{ {
CheckFormField(\%::FORM, 'product', \@::legal_product); CheckFormField(\%::FORM, 'product', \@::legal_product);
...@@ -509,7 +509,7 @@ sub DoConfirm { ...@@ -509,7 +509,7 @@ sub DoConfirm {
sub ChangeStatus { sub ChangeStatus {
my ($str) = (@_); my ($str) = (@_);
if ($str ne $::dontchange) { if ($str ne $::FORM{'dontchange'}) {
DoComma(); DoComma();
if ($::FORM{knob} eq 'reopen') { if ($::FORM{knob} eq 'reopen') {
# When reopening, we need to check whether the bug was ever # When reopening, we need to check whether the bug was ever
...@@ -561,7 +561,7 @@ sub ChangeStatus { ...@@ -561,7 +561,7 @@ sub ChangeStatus {
sub ChangeResolution { sub ChangeResolution {
my ($str) = (@_); my ($str) = (@_);
if ($str ne $::dontchange) { if ($str ne $::FORM{'dontchange'}) {
DoComma(); DoComma();
$::query .= "resolution = " . SqlQuote($str); $::query .= "resolution = " . SqlQuote($str);
} }
...@@ -604,7 +604,7 @@ foreach my $field ("rep_platform", "priority", "bug_severity", ...@@ -604,7 +604,7 @@ foreach my $field ("rep_platform", "priority", "bug_severity",
"version", "op_sys", "version", "op_sys",
"target_milestone", "status_whiteboard") { "target_milestone", "status_whiteboard") {
if (defined $::FORM{$field}) { if (defined $::FORM{$field}) {
if ($::FORM{$field} ne $::dontchange) { if ($::FORM{$field} ne $::FORM{'dontchange'}) {
DoComma(); DoComma();
$::query .= "$field = " . SqlQuote(trim($::FORM{$field})); $::query .= "$field = " . SqlQuote(trim($::FORM{$field}));
} }
...@@ -612,7 +612,7 @@ foreach my $field ("rep_platform", "priority", "bug_severity", ...@@ -612,7 +612,7 @@ foreach my $field ("rep_platform", "priority", "bug_severity",
} }
my $prod_id; # Remember, can't use this for mass changes my $prod_id; # Remember, can't use this for mass changes
if ($::FORM{'product'} ne $::dontchange) { if ($::FORM{'product'} ne $::FORM{'dontchange'}) {
$prod_id = get_product_id($::FORM{'product'}); $prod_id = get_product_id($::FORM{'product'});
$prod_id || $prod_id ||
ThrowUserError("invalid_product_name", {product => $::FORM{'product'}}); ThrowUserError("invalid_product_name", {product => $::FORM{'product'}});
...@@ -627,7 +627,7 @@ if ($::FORM{'product'} ne $::dontchange) { ...@@ -627,7 +627,7 @@ if ($::FORM{'product'} ne $::dontchange) {
} }
my $comp_id; # Remember, can't use this for mass changes my $comp_id; # Remember, can't use this for mass changes
if ($::FORM{'component'} ne $::dontchange) { if ($::FORM{'component'} ne $::FORM{'dontchange'}) {
if (!defined $prod_id) { if (!defined $prod_id) {
ThrowUserError("no_component_change_for_multiple_products"); ThrowUserError("no_component_change_for_multiple_products");
} }
...@@ -693,7 +693,7 @@ if (Param("usebugaliases") && defined($::FORM{'alias'})) { ...@@ -693,7 +693,7 @@ if (Param("usebugaliases") && defined($::FORM{'alias'})) {
if (defined $::FORM{'qa_contact'}) { if (defined $::FORM{'qa_contact'}) {
my $name = trim($::FORM{'qa_contact'}); my $name = trim($::FORM{'qa_contact'});
if ($name ne $::dontchange) { if ($name ne $::FORM{'dontchange'}) {
my $id = 0; my $id = 0;
if ($name ne "") { if ($name ne "") {
$id = DBNameToIdAndCheck($name); $id = DBNameToIdAndCheck($name);
...@@ -829,10 +829,10 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -829,10 +829,10 @@ SWITCH: for ($::FORM{'knob'}) {
last SWITCH; last SWITCH;
}; };
/^reassignbycomponent$/ && CheckonComment( "reassignbycomponent" ) && do { /^reassignbycomponent$/ && CheckonComment( "reassignbycomponent" ) && do {
if ($::FORM{'product'} eq $::dontchange) { if ($::FORM{'product'} eq $::FORM{'dontchange'}) {
ThrowUserError("need_product"); ThrowUserError("need_product");
} }
if ($::FORM{'component'} eq $::dontchange) { if ($::FORM{'component'} eq $::FORM{'dontchange'}) {
ThrowUserError("need_component"); ThrowUserError("need_component");
} }
if ($::FORM{'compconfirm'}) { if ($::FORM{'compconfirm'}) {
...@@ -1073,7 +1073,7 @@ foreach my $id (@idlist) { ...@@ -1073,7 +1073,7 @@ foreach my $id (@idlist) {
$oldhash{'product'} = get_product_name($oldhash{'product_id'}); $oldhash{'product'} = get_product_name($oldhash{'product_id'});
if ($requiremilestone) { if ($requiremilestone) {
my $value = $::FORM{'target_milestone'}; my $value = $::FORM{'target_milestone'};
if (!defined $value || $value eq $::dontchange) { if (!defined $value || $value eq $::FORM{'dontchange'}) {
$value = $oldhash{'target_milestone'}; $value = $oldhash{'target_milestone'};
} }
SendSQL("SELECT defaultmilestone FROM products WHERE name = " . SendSQL("SELECT defaultmilestone FROM products WHERE name = " .
...@@ -1341,7 +1341,7 @@ foreach my $id (@idlist) { ...@@ -1341,7 +1341,7 @@ foreach my $id (@idlist) {
# the user has changed the product to which the bug belongs; # the user has changed the product to which the bug belongs;
&& defined $::FORM{'product'} && defined $::FORM{'product'}
&& $::FORM{'product'} ne $::dontchange && $::FORM{'product'} ne $::FORM{'dontchange'}
&& $::FORM{'product'} ne $oldhash{'product'} && $::FORM{'product'} ne $oldhash{'product'}
) { ) {
if ( if (
......
...@@ -88,9 +88,10 @@ ...@@ -88,9 +88,10 @@
[% current_tab.description FILTER lower %] have been saved. [% current_tab.description FILTER lower %] have been saved.
</font> </font>
</p> </p>
[% IF changes_saved != 1 %] [% IF email_changes_saved %]
<p> <p>
[% changes_saved %] An email has been sent to both old and new email
addresses to confirm the change of email address.
</p> </p>
[% END %] [% END %]
[% END %] [% END %]
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[%# INTERFACE:
# As global/header.html.tmpl.
#%]
[% IF title_tag == "bug_processed" %]
[% title = "Bug processed" %]
[% ELSIF title_tag == "mid_air" %]
[% title = "Mid-air collision!" %]
[% END %]
[% PROCESS global/header.html.tmpl %]
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
# Contributor(s): Myk Melez <myk@mozilla.org> # Contributor(s): Myk Melez <myk@mozilla.org>
#%] #%]
[% dontchange = "--do_not_change--" %]
<input type="hidden" name="dontchange" value="[% dontchange %]">
<script type="text/javascript" language="JavaScript"> <script type="text/javascript" language="JavaScript">
var numelements = document.forms.changeform.elements.length; var numelements = document.forms.changeform.elements.length;
function SetCheckboxes(value) { function SetCheckboxes(value) {
......
...@@ -138,9 +138,7 @@ sub SaveAccount { ...@@ -138,9 +138,7 @@ sub SaveAccount {
Token::IssueEmailChangeToken($userid,$old_login_name, Token::IssueEmailChangeToken($userid,$old_login_name,
$new_login_name); $new_login_name);
$vars->{'changes_saved'} = $vars->{'email_changes_saved'} = 1;
"An email has been sent to both old and new email
addresses to confirm the change of email address.";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment