mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Fix for bug 142828: prompts the user for a file to edit if none is given.
This commit is contained in:
parent
ba8dd72871
commit
0b87d739e3
@ -128,7 +128,18 @@ my $at_sign = 0;
|
||||
# Determine whether to use the action specified by the user or the default.
|
||||
my $action = lc($request->param('action')) || "edit";
|
||||
|
||||
if ($action eq "edit")
|
||||
# If the user wants to edit a file, but they haven't specified the name
|
||||
# of the file, prompt them for it.
|
||||
if ($action eq "edit" && !$request->param('file')) { $action = "select" }
|
||||
|
||||
if ($action eq "select")
|
||||
{
|
||||
print $request->header;
|
||||
$template->process("select.tmpl", $vars)
|
||||
|| DisplayError("Template Process Failed", $template->error())
|
||||
&& exit;
|
||||
}
|
||||
elsif ($action eq "edit")
|
||||
{
|
||||
ValidateFile();
|
||||
|
||||
|
54
webtools/doctor/templates/select.tmpl
Normal file
54
webtools/doctor/templates/select.tmpl
Normal file
@ -0,0 +1,54 @@
|
||||
[%#
|
||||
# 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 Doctor.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape
|
||||
# are Copyright (C) 2002 Netscape Communications Corporation.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Myk Melez <myk@mozilla.org>
|
||||
# %]
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Doctor - select file to edit</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" color="black">
|
||||
|
||||
<big><b>Doctor - select file to edit</b></big>
|
||||
|
||||
<br><br>
|
||||
|
||||
<p>
|
||||
Welcome to Doctor, a tool for editing the mozilla.org web site.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To edit a file on the web site, enter its URL or the path
|
||||
to the file in the CVS repository.
|
||||
</p>
|
||||
|
||||
<form method="get" action="doctor.cgi">
|
||||
|
||||
<input type="hidden" name="action" value="edit">
|
||||
<input type="text" name="file" value="" size="60">
|
||||
|
||||
<input type="submit" value="Edit">
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user