gecko-dev/webtools/doctor/templates/edit.tmpl

123 lines
5.1 KiB
Cheetah
Raw Normal View History

[%#
# 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>
# %]
[% is_new = (version == "new" ? 1 : 0) %]
[% wysiwyg = content.match("<\?doctor enable_wysiwyg_mode \?>") %]
<html>
<head>
<title>Doctor - [% is_new ? "create" : "edit" %] [% (file_url ? file_url : file) FILTER html %]</title>
[% IF wysiwyg %]
<script type="text/javascript">
_editor_url = "/htmlarea/";
_editor_lang = "en";
wysiwyg = true;
</script>
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
<script type="text/javascript">
HTMLArea.loadPlugin("FullPage");
</script>
[% ELSE %]
<script type="text/javascript">
wysiwyg = false;
</script>
[% END %]
<script type="text/javascript" src="doctor.js"></script>
<link rel="stylesheet" href="doctor.css" type="text/css"></link>
</head>
<body bgcolor="white" color="black" onload="onLoad();">
<span style="float: right;">
<a href="doctor.cgi?action=list">Review Queue</a>
</span>
<big><b>Doctor - [% is_new ? "create" : "edit" %] <em>
[% IF file_url %]
<a href="[% file_url FILTER html %]">[% file_url FILTER html %]</a>
[% ELSE %]
[% file FILTER html %]
[% END %]
</em></b></big>
<form id="form" method="post" action="doctor.cgi" enctype="multipart/form-data">
[% IF is_new %]
Username: <input type="text" name="username" size="10">
Password: <input type="password" name="password" size="10">
Check-in Comment: <input type="text" name="comment" size="50">
<button type="submit" name="action" value="create">Create</button>
[% ELSE %]
Edit using the form below or
<a href="doctor.cgi?file=[% file | uri | html %]&amp;action=download">download the page</a>,
edit it locally, then upload it: <input id="content_file" type="file" name="content_file">
[% END %]
<br>
<input id="file" type="hidden" name="file" value="[% file FILTER html %]">
<input id="version" type="hidden" name="version" value="[% version %]">
<input id="line_endings" type="hidden" name="line_endings" value="[% line_endings %]">
[% IF patch_id %]
<input id="patch_id" type="hidden" name="patch_id" value="[% patch_id %]">
[% END %]
[% IF !is_new %]
<button id="editTab" class="tab [% "wysiwyg" IF wysiwyg %]"
type="button" onclick="switchToTab('edit');" disabled="disabled">Edit</button>
<button id="hackTab" class="tab" type="button" onclick="switchToTab('hack');" disabled="disabled">Edit Source</button>
<button id="originalTab" class="tab" type="button" onclick="switchToTab('original');" disabled="disabled">View Original</button>
<button id="modifiedTab" class="tab" type="button" onclick="switchToTab('modified');" disabled="disabled">View Edited</button>
<button id="diffTab" class="tab" type="button" onclick="switchToTab('diff');" disabled="disabled">Show Diff</button>
<button id="saveTab" class="tab" type="button" onclick="switchToTab('save');" disabled="disabled">Save Changes</button>
<br>
[% END %]
<div id="panels">
<div id="editPanel" class="panel">
<textarea id="content" name="content" rows="16" cols="100">[% content FILTER html %]</textarea><br>
</div>
<iframe id="originalPanel" class="panel" src="doctor.cgi?file=[% file | uri | html %]&amp;action=display"></iframe>
<div id="modifiedPanel" class="panel"></div>
<iframe id="diffPanel" class="panel" name="diffPanel"></iframe>
<div id="savePanel" class="panel">
<p>
Username: <input type="text" name="username" size="20">
Password: <input type="password" name="password" size="20"><br>
Change Comment:<br><textarea rows="5" cols="80" name="comment"></textarea><br>
<button type="submit" name="action" value="commit">Commit Changes</button>
</p>
<p>
Don't have commit privileges?
</p>
<p>
Email Address: <input type="text" name="email" size="30"><br>
Change Comment:<br><textarea rows="5" cols="80" name="queue_comment"></textarea><br>
<button type="submit" name="action" value="queue">Submit Changes for Review</button>
</p>
</div>
</div>
</form>
</body>
</html>