bugzilla-4intranet/template/en/default/bug/edit.html.tmpl

1042 lines
39 KiB
Cheetah

[%# 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>
# Vaskin Kissoyan <vkissoyan@yahoo.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
# Olav Vitters <olav@bkor.dhs.org>
# Guy Pyrzak <guy.pyrzak@gmail.com>
# Elliotte Martin <emartin@everythingsolved.com>
#%]
[% PROCESS bug/time.html.tmpl %]
[% SET select_fields = {} %]
[% FOREACH field = Bugzilla.get_fields(
{ type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 })
%]
[% select_fields.${field.name} = field %]
[% END %]
<script type="text/javascript">
<!--
var user_settings = {
'is_insider' : [% user.is_insider ? 1 : 0 %],
'wants_worktime_reminder' : [% user.wants_worktime_reminder ? 1 : 0 %],
'quote_replies' : "[% user.settings.quote_replies.value | js %]"
};
var bug_info = {
'id' : [% bug.bug_id %],
'product' : "[% bug.product | js %]",
'extprod' : "[% bug.product_obj.enterable_extproduct_name | js %]",
'intprod' : "[% bug.product_obj.enterable_intproduct_name | js %]"
};
var fRemainingTime = [% bug.remaining_time %];
var notimetracking = [% bug.product_obj.notimetracking ? 1 : 0 %];
//-->
</script>
[%# CustIS Bug 57315 - Force Fucking Firefox to reset form on Reload %]
[% SET cfname = 'changeform_' _ bug.delta_ts.replace('\D+', '') %]
<form id="form_bug_edit" name="[% cfname %]" method="post" action="process_bug.cgi" enctype="multipart/form-data"
onsubmit="return changeform_onsubmit()" onkeypress="return ctrlEnter(event||window.event,this)">
<script type="text/javascript">
document.forms.changeform = document.forms.[% cfname %];
document.changeform = document.[% cfname %];
</script>
<input type="hidden" name="delta_ts" value="[% bug.delta_ts %]" />
<input type="hidden" name="longdesclength" value="[% bug.comments.size %]" />
<input type="hidden" name="id" value="[% bug.bug_id %]" />
<input type="hidden" name="token" value="[% issue_hash_token([bug.id, bug.delta_ts]) FILTER html %]" />
<input type="hidden" name="force_work_time" value="1" />
[% SET use_divs = 1 %]
[% SET no_tds = 1 %]
[% PROCESS section_title %]
<div class="edit_form" id="bz_show_bug_table">
<div class="bz_show_bug_colpair">
<div id="bz_show_bug_column_1" class="bz_show_bug_column">
[% PROCESS section_status %]
[% PROCESS section_details1 %]
[% PROCESS section_people %]
[% PROCESS section_customfields part=1 %]
</div>
<div id="bz_show_bug_column_2" class="bz_show_bug_column">
[% PROCESS section_details2 %]
[% PROCESS section_keyword_whiteboard %]
[% PROCESS section_url %]
[% PROCESS section_customfields part=2 %]
</div>
</div>
<div class="bz_show_bug_colpair">
<div id="bz_show_bug_column_3" class="bz_show_bug_column">
[% PROCESS section_dates %]
[% PROCESS section_see_also %]
[% PROCESS section_dependson_blocks %]
[% PROCESS section_customfields part=3 %]
</div>
<div id="bz_show_bug_column_4" class="bz_show_bug_column">
[% PROCESS section_cclist %]
[% PROCESS section_customfields part=4 %]
[% Hook.process("after_custom_fields") %]
[% PROCESS section_flags %]
</div>
</div>
<hr id="bz_top_half_spacer" />
</div>
<div id="bz_big_form_parts">
<table class="flatten_table"><tr><td style="padding-right: 1em">
[% IF user.is_timetracker %]
[% PROCESS section_timetracking %]
[% END %]
[%# *** Attachments *** %]
[% PROCESS attachment/list.html.tmpl
attachments = bug.attachments
bugid = bug.bug_id
show_attachment_flags = bug.show_attachment_flags
%]
</td><td>
[% PROCESS section_restrict_visibility %]
</td></tr></table>
<div style="clear: both"></div>[%# clear float of flatten_table %]
</div>
[% PROCESS comment_box %]
[%# *** Additional Comments *** %]
<div id="comments">
[% PROCESS bug/comments.html.tmpl
comments = bug.comments
mode = user.id ? "edit" : "show"
%]
</div>
</form>
[%############################################################################%]
[%# Block for the Title (alias and short desc) #%]
[%############################################################################%]
[% BLOCK section_title %]
<div class="bz_alias_short_desc_container">
[% PROCESS commit_button id="_top" nobr=1 %]
<a href="show_bug.cgi?id=[% bug.bug_id %]">
<b>[% terms.Bug %]&nbsp;[% bug.bug_id FILTER html %]</b>
</a>
<span id="summary_alias_container" class="bz_default_hidden">
<span>-
[% IF Bugzilla.get_field('alias').enabled && bug.alias != '' %]
(<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>)
[% END %]
</span>
<span id="short_desc_nonedit_display">[% bug.short_desc FILTER html %]</span>
[% IF bug.check_can_change_field('short_desc', 0, 1) ||
bug.check_can_change_field('alias', 0, 1) %]
<small class="editme">(<a href="#" id="editme_action">edit</a>)</small>
[% END %]
</span>
<div id="summary_alias_input">
<table id="summary">
[% IF Bugzilla.get_field('alias').enabled %]
<tr>
[% IF bug.check_can_change_field('alias', 0, 1) %]
<td>
<label
for="alias"
title="a name for the
[% terms.bug %] that can be used in place of its ID number,
[%%] e.g. when adding it to a list of dependencies"
>Alias</label>:</td><td>
[% ELSIF bug.alias %]
<td colspan="2">(
[% ELSE %]
<td colspan="2">
[% END %]
[% PROCESS input inputname => "alias"
size => "20"
maxlength => "20"
no_td => 1
%][% ")" IF NOT bug.check_can_change_field('alias', 0, 1)
&& bug.alias %]
</td>
</tr>
[% END %]
[%# *** Summary *** %]
<tr>
<td>
<label accesskey="s" for="short_desc"><u>S</u>ummary</label>:
</td>
<td>
[% PROCESS input inputname => "short_desc" size => "80" colspan => 2
maxlength => 255 spellcheck => "true" no_td => 1 %]
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
hideAliasAndSummary('[% bug.short_desc FILTER js %]', '[% bug.alias FILTER js %]');
</script>
[% END %]
[%############################################################################%]
[%# Block for the first table in the "Details" section #%]
[%############################################################################%]
[% BLOCK section_details1 %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.product,
desc_url = 'describecomponents.cgi', value = bug.product_id
editable = bug.check_can_change_field('product', 0, 1) %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.component,
value = bug.component_id,
editable = bug.check_can_change_field('component', 0, 1) %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.version,
value = bug.version,
editable = bug.check_can_change_field('version', 0, 1) %]
<script type="text/javascript">
assignToDefaultOnChange(['product', 'component']);
</script>
[% END %]
[%############################################################################%]
[%# Block for the status section #%]
[%############################################################################%]
[% BLOCK section_status %]
<div class="bug_field">
<label><a href="page.cgi?id=fields.html#status">Status</a>:</label><br />
<span id="static_bug_status">
[% bug.bug_status_obj.name FILTER html %]
[% IF bug.resolution %]
[%+ bug.resolution_obj.name FILTER html %]
[% IF bug.dup_id %]
of [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %]
[% END %]
[% END %]
[% IF bug.user.canedit || bug.user.isreporter %]
(<a href="#add_comment"
onclick="window.setTimeout(function() { document.getElementById('bug_status').focus(); }, 10)">edit</a>)
[% END %]
</span>
</div>
[% END %]
[%############################################################################%]
[%# Block for the second table in the "Details" section #%]
[%############################################################################%]
[% BLOCK section_details2 %]
[%###############################################################%]
[%# Importance (priority, severity and votes) #%]
[%###############################################################%]
<div class="bug_field">
<label for="priority" accesskey="i">
<a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a>:</label>
<br />
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.priority,
value = bug.priority
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('priority', 0, 1) %]
[%+ INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.bug_severity,
value = bug.bug_severity
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('bug_severity', 0, 1) %]
<a href="buglist.cgi?query_format=advanced&amp;product=[% bug.product | uri %]&amp;bug_severity=[% bug.bug_severity_obj.name | uri %]"
target="_blank" id="search_link_bug_severity" class="search-link">(search)</a>
[% IF bug.use_votes %]
<span id="votes_container">
[% IF bug.votes %]
with
<a href="votes.cgi?action=show_bug&amp;bug_id=[% bug.bug_id %]">
[% bug.votes %]
[% IF bug.votes == 1 %]
vote
[% ELSE %]
votes
[% END %]</a>
[% END %]
(<a href="votes.cgi?action=show_user&amp;bug_id=[% bug.bug_id %]#vote_[% bug.bug_id %]">vote</a>)
</span>
[% END %]
</div>
[%###################%]
[%# PLATFORM AND OS #%]
[%###################%]
[% IF (Bugzilla.get_field('rep_platform').enabled OR Bugzilla.get_field('op_sys').enabled) AND
(bug.check_can_change_field('rep_platform', 0, 1) || bug.check_can_change_field('op_sys', 0, 1) ||
bug.op_sys || bug.rep_platform) %]
<div class="bug_field">
<label for="rep_platform" accesskey="h">OS/Platform:</label>
<br />
[% IF Bugzilla.get_field('op_sys').enabled %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.op_sys,
value = bug.op_sys
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('op_sys', 0, 1) %]
[% END %]
[%+ IF Bugzilla.get_field('rep_platform').enabled %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.rep_platform,
value = bug.rep_platform
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('rep_platform', 0, 1) %]
[% END %]
</div>
[% END %]
[% IF Bugzilla.get_field('target_milestone').enabled %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.target_milestone,
value = bug.target_milestone,
editable = bug.check_can_change_field('target_milestone', 0, 1) %]
[% END %]
[% END %]
[%############################################################################%]
[%# Block for the table in the "People" section #%]
[%############################################################################%]
[% BLOCK section_people %]
<div class="bug_field" id="field_container_assigned_to">
<label for="assigned_to"><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a>:</label>
<br />
[% IF bug.check_can_change_field("assigned_to", 0, 1) %]
<div id="bz_assignee_edit_container" class="bz_default_hidden">
<span>
[% INCLUDE global/user.html.tmpl who = bug.assigned_to %]
(<a href="#" id="bz_assignee_edit_action">edit</a>)
</span>
</div>
<div id="bz_assignee_input">
[% INCLUDE global/userselect.html.tmpl
id => "assigned_to"
name => "assigned_to"
value => bug.assigned_to.login
size => 30
%]
<br />
<input type="checkbox" id="set_default_assignee" name="set_default_assignee" value="1" />
<label id="set_default_assignee_label" for="set_default_assignee">Reset Assignee to default</label>
</div>
<script type="text/javascript">
hideEditableField('bz_assignee_edit_container',
'bz_assignee_input',
'bz_assignee_edit_action',
'assigned_to',
'[% bug.assigned_to.login FILTER js %]' );
initDefaultCheckbox('assignee');
</script>
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = bug.assigned_to %]
[% END %]
</div>
[% IF Bugzilla.get_field('qa_contact').enabled %]
<div class="bug_field" id="field_container_qa_contact">
<label for="qa_contact" accesskey="q"><u>Q</u>A Contact:</label>
<br />
[% IF bug.check_can_change_field("qa_contact", 0, 1) %]
[% IF bug.qa_contact != "" %]
<div id="bz_qa_contact_edit_container" class="bz_default_hidden">
<span>
<span id="bz_qa_contact_edit_display">
[% INCLUDE global/user.html.tmpl who = bug.qa_contact %]</span>
(<a href="#" id="bz_qa_contact_edit_action">edit</a>)
</span>
</div>
[% END %]
<div id="bz_qa_contact_input">
[% INCLUDE global/userselect.html.tmpl
id => "qa_contact"
name => "qa_contact"
value => bug.qa_contact.login
size => 30
emptyok => 1
%]
<br />
<input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1" />
<label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default ([% bug.component_obj.default_qa_contact.login | html %])</label>
</div>
<script type="text/javascript">
[% IF bug.qa_contact != "" %]
hideEditableField('bz_qa_contact_edit_container',
'bz_qa_contact_input',
'bz_qa_contact_edit_action',
'qa_contact',
'[% bug.qa_contact.login FILTER js %]');
[% END %]
initDefaultCheckbox('qa_contact');
</script>
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = bug.qa_contact %]
[% END %]
</div>
[% END %]
[% END %]
[%############################################################################%]
[%# Block for URL Keyword and Whiteboard #%]
[%############################################################################%]
[% BLOCK section_url %]
[% SET url_trimmed = bug.bug_file_loc.replace('^\s+|\s+$', '') %]
[% SET chg = bug.check_can_change_field("bug_file_loc", 0, 1) %]
[% IF chg OR url_trimmed != '' %]
<div class="bug_field" id="field_container_bug_file_loc">
<label for="bug_file_loc" accesskey="u">
[% IF is_safe_url(url_trimmed) %]
<a href="[% url_trimmed FILTER html %]"><u>U</u>RL</a>
[% ELSE %]
<u>U</u>RL
[% END %]:
</label>
<br />
[% IF chg %]
<span id="bz_url_edit_container" class="bz_default_hidden">
[% IF is_safe_url(url_trimmed) %]
<a href="[% url_trimmed FILTER html %]" target="_blank"
title="[% url_trimmed FILTER html %]">
[% url_trimmed FILTER truncate(40) FILTER html %]</a>
[% ELSE %]
[% url_trimmed FILTER html %]
[% END %]
(<a href="#" id="bz_url_edit_action">edit</a>)</span>
[% END %]
<span id="bz_url_input_area">
[% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
[% IF NOT chg AND is_safe_url(url_trimmed) %]
<a href="[% url_trimmed FILTER html %]">[% url_output FILTER none %]</a>
[% ELSE %]
[% url_output FILTER none %]
[% END %]
</span>
[% IF chg %]
<script type="text/javascript">
hideEditableField(
'bz_url_edit_container',
'bz_url_input_area',
'bz_url_edit_action',
'bug_file_loc',
"[% bug.bug_file_loc FILTER js %]"
);
</script>
[% END %]
</div>
[% END %]
[% END %]
[% BLOCK section_keyword_whiteboard %]
[% IF Bugzilla.get_field('status_whiteboard').enabled &&
(bug.status_whiteboard != '' OR bug.check_can_change_field('status_whiteboard', 0, 1)) %]
<div class="bug_field" id="field_container_status_whiteboard">
<label for="status_whiteboard" accesskey="w"><u>W</u>hiteboard:</label>
<br />
[% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %]
</div>
[% END %]
[% IF Bugzilla.has_keywords %]
[% val = bug.get_string('keywords') %]
[% chg = bug.check_can_change_field('keywords', 0, 1) %]
[% IF val != '' OR chg %]
<div class="bug_field" id="field_container_keywords">
<label for="keywords" accesskey="k"><a href="describekeywords.cgi"><u>K</u>eywords</a>:</label>
<br />
[% IF chg %]
[% IF val != '' %]
[% FOREACH keyword = bug.keywords_obj %]
<a href="buglist.cgi?keywords=[% keyword.name | uri %]&amp;keywords_type=allwords&amp;query_format=advanced"
target="_blank">[% keyword.name | html %]</a>
[% ',' UNLESS loop.last %]
[% END %]
(<a href="#" onclick="return toggle_keywords_field()">Edit</a>)
<script type="text/javascript">
function toggle_keywords_field()
{
var el = document.getElementById('keywords_field');
if (el.style.display == 'block')
el.style.display = 'none';
else
el.style.display = 'block';
return false;
}
</script>
<div id="keywords_field" style="display: none; margin-top: 3px;">
[% END %]
<input id="keywords" name="keywords" class="text_input" value="[% val | html %]" />
<script type="text/javascript">
addKeywordsAutocomplete();
</script>
[% IF val != "" %]
</div>
[% END %]
<div id="keywords_description_container"></div>
[% ELSE %]
[% val | html %]
[% END %]
</div>
[% END %]
[% END %]
[% END %]
[%############################################################################%]
[%# Block for Depends On / Blocks #%]
[%############################################################################%]
[% BLOCK section_dependson_blocks %]
[% PROCESS dependencies dep = { title => "Depends&nbsp;on", fieldname => "dependson" } %]
[% IF bug.lastchangeddeps %]
<div>
<font size="-2">Blockers completed <b>~[% bug.depscompletedpercent %]%</b>, last changed <b>[% bug.lastchangeddeps %]</b></font>
</div>
[% END %]
[% PROCESS dependencies accesskey = "b" dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
<div id="show_dependency_tree_or_graph">
Show dependency <a href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">tree</a>
[% IF Param('webdotbase') %]
/&nbsp;<a href="showdependencygraph.cgi?id=[% bug.bug_id %]">graph</a>
[% END %]
[% PROCESS scrum_cards %]
</div>
[% END %]
[%############################################################################%]
[%# Block for Restricting Visibility #%]
[%############################################################################%]
[% BLOCK section_restrict_visibility %]
[% RETURN UNLESS bug.groups.size %]
<div class="bz_group_visibility_section">
[% inallgroups = 1 %]
[% inagroup = 0 %]
[% emitted_description = 0 %]
[% FOREACH group = bug.groups %]
[% SET inallgroups = 0 IF NOT group.ingroup %]
[% SET inagroup = 1 IF group.ison %]
[% NEXT IF group.mandatory %]
[% IF NOT emitted_description %]
[% emitted_description = 1 %]
<div id="bz_restrict_group_visibility_help">
<b>Only users in all of the selected groups can view this
[%+ terms.bug %]:</b>
<p class="instructions">
Unchecking all boxes makes this a more public [% terms.bug %].
</p>
</div>
[% END %]
[% IF group.ingroup %]
<input type="hidden" name="defined_bit-[% group.bit %]" value="1" />
[% END %]
<input type="checkbox" value="1" name="bit-[% group.bit %]"
id="bit-[% group.bit %]"
[% ' checked="checked"' IF group.ison %]
[% ' disabled="disabled"' IF NOT group.ingroup %] />
<label for="bit-[% group.bit %]">[%- group.description FILTER html_light %]</label>
<br />
[% END %]
[% IF emitted_description %]
[% IF NOT inallgroups %]
<p class="instructions">Only members of a group can change the
visibility of [% terms.abug %] for that group.</p>
[% END %]
[% END %]
[% IF inagroup %]
<div id="bz_enable_role_visibility_help" [% ' style="margin-top: 0.5em"' IF emitted_description %]>
<b>[% emitted_description ? 'Also allow' : 'Allow' %] to view this [% terms.bug %]:</b>
</div>
<div id="bz_enable_role_visibility">
<div>
[% user_can_edit_accessible =
bug.check_can_change_field("reporter_accessible", 0, 1)
%]
[% IF user_can_edit_accessible %]
<input type="hidden" name="defined_reporter_accessible" value="1" />
[% END %]
<input type="checkbox" value="1"
name="reporter_accessible" id="reporter_accessible"
[% ' checked="checked"' IF bug.reporter_accessible %]
[% ' disabled="disabled"' UNLESS user_can_edit_accessible %] />
<label for="reporter_accessible">Allow reporter to view this [% terms.bug %]</label>
</div>
<div>
[% user_can_edit_accessible =
bug.check_can_change_field("cclist_accessible", 0, 1)
%]
[% IF user_can_edit_accessible %]
<input type="hidden" name="defined_cclist_accessible" value="1" />
[% END %]
<input type="checkbox" value="1"
name="cclist_accessible" id="cclist_accessible"
[% ' checked="checked"' IF bug.cclist_accessible %]
[% ' disabled="disabled"' UNLESS user_can_edit_accessible %] />
<label for="cclist_accessible">Allow CC List users to view this [% terms.bug %]</label>
</div>
<p class="instructions">
The assignee
[% IF Bugzilla.get_field('qa_contact').enabled %]
and QA contact
[% END %]
can always see [% terms.abug %], and this section does not
take effect unless the [% terms.bug %] is restricted to at
least one group.
</p>
</div>
[% END %]
[%# *** Check access to bug *** %]
<p class="instructions">
<a href="check_access.cgi?id=[% bug.bug_id %]">List users who can see this bug</a>
</p>
</div> [%# bz_group_visibility_section %]
[% END %]
[%############################################################################%]
[%# Block for Dates #%]
[%############################################################################%]
[% BLOCK section_dates %]
<div class="bug_field">
<label>Reported:</label>
<br />
[% bug.creation_ts FILTER time %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %]
</div>
<div class="bug_field">
<label>Modified:</label>
<br />
[% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%]
(<a href="show_activity.cgi?id=[% bug.bug_id %]">[%# terms.Bug %]History</a>)
</div>
[% END %]
[%############################################################################%]
[%# Block for CC LIST #%]
[%############################################################################%]
[% BLOCK section_cclist %]
<div class="bug_field" id="field_container_cc">
<label for="newcc" accesskey="a">CC List:</label>
<br />
[% chg = bug.check_can_change_field('cc', 0, 1) %]
<span id="cc_list_num_users"[% IF chg %] class="bz_default_hidden"[% END %]>
[% bug.cc.size || 0 FILTER html %] [%+ bug.cc.size > 1 ? 'users' : 'user' %]
[% IF user.id AND bug.cc.contains(user.email) %] including you[% END %]
[%+ IF chg %](<a href="#" id="cc_edit_area_showhide">edit</a>)[% END %]
</span>
[% IF user.id && (NOT bug.cc || NOT bug.cc.contains(user.login)) %]
<span id="cc_edit_add_self">
[% has_role = bug.reporter_id == user.id || bug.assigned_to_id == user.id ||
(Bugzilla.get_field('qa_contact').enabled && bug.qa_contact_id && bug.qa_contact_id == user.id) %]
<input type="checkbox" id="addselfcc" name="addselfcc"
[% ' checked="checked"' IF user.settings.state_addselfcc.value == 'always'
|| (!has_role && user.settings.state_addselfcc.value == 'cc_unless_role') %] />
<label for="addselfcc" style="font-weight: normal">Add me to CC list</label>
</span>
[% END %]
<div id="cc_edit_area_showhide_container"[% IF chg %] class="bz_default_hidden"[% END %]>
[% IF bug.cc.size > 0 %]
<ul class="cc_list_display">
[% FOR c = bug.cc %]
<li>[% c FILTER email FILTER html %]</li>
[% END %]
</ul>
<div style="clear: both"></div>
[% END %]
</div>
[% IF chg %]
<div id="cc_edit_area">
[% IF user.id %]
<div>
<label for="cc"><b>Add</b>: </label>
[% INCLUDE global/userselect.html.tmpl
id => "newcc"
name => "newcc"
value => ""
size => 30
multiple => 5
%]
</div>
[% END %]
[% IF bug.cc.size %]
<select id="cc" name="cc" multiple="multiple" size="5" style="width: auto">
[% FOREACH c = bug.cc %]
<option value="[% c | email | html %]">[% c | email | html %]</option>
[% END %]
</select>
[% IF user.id %]
<br />
<input type="checkbox" id="removecc" name="removecc" /><label for="removecc">Remove selected CCs</label>
<br />
[% END %]
[% END %]
[% Hook.process('after_cc_list') %]
</div>
<script type="text/javascript">
hideEditableField(
[ 'cc_edit_area_showhide_container', 'cc_list_num_users' ],
'cc_edit_area', 'cc_edit_area_showhide', '', ''
);
</script>
[% END %]
</div>
[% END %]
[%############################################################################%]
[%# Block for See Also #%]
[%############################################################################%]
[% BLOCK section_see_also %]
[% IF Bugzilla.get_field('see_also').enabled || bug.see_also.size %]
[% INCLUDE bug/field.html.tmpl
field = Bugzilla.get_field('see_also')
value = bug.see_also
editable = bug.check_can_change_field('see_also', 0, 1)
%]
[% END %]
[% END %]
[%############################################################################%]
[%# Block for FLAGS #%]
[%############################################################################%]
[% BLOCK section_flags %]
[%# *** Flags *** %]
[% show_bug_flags = 0 %]
[% FOREACH type = bug.flag_types %]
[% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %]
[% show_bug_flags = 1 %]
[% LAST %]
[% END %]
[% END %]
[% IF show_bug_flags %]
<div class="bug_field">
[% IF bug.flag_types.size > 0 %]
[% PROCESS "flag/list.html.tmpl"
flag_types = bug.flag_types
any_flags_requesteeble = bug.any_flags_requesteeble
%]
[% END %]
</div>
[% END %]
[% END %]
[%############################################################################%]
[%# Block for Custom Fields #%]
[%############################################################################%]
[% BLOCK section_customfields %]
[% FOREACH field = Bugzilla.active_custom_fields %]
[% IF (part == 1 || field.sortkey >= (part - 1)*1000) && (part == 4 || field.sortkey < part*1000) %]
[% INCLUDE bug/field.html.tmpl
value = bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1)
value_span = 2 %]
[% END %]
[% END %]
[% END %]
[%############################################################################%]
[%# Block for dependencies #%]
[%############################################################################%]
[% BLOCK dependencies %]
[% chg = bug.check_can_change_field(dep.fieldname, 0, 1) %]
[% IF chg || bug.${dep.fieldname}.size %]
<div class="bug_field" id="field_container_[% dep.fieldname %]">
<label for="[% dep.fieldname %]"[% " accesskey=\"$accesskey\"" IF accesskey %]>
[% dep.title %]:</label>
<br />
<span id="[% dep.fieldname %]_input_area">
[% IF chg %]
<input name="[% dep.fieldname %]" id="[% dep.fieldname %]"
class="text_input"
value="[% bug.${dep.fieldname}.join(', ') %]" />
[% END %]
</span>
[% FOREACH depbug = bug.${dep.fieldname} %]
[% depbug FILTER bug_link(depbug, use_alias => 1) FILTER none %][% " " %]
[% END %]
[% IF chg %]
<span id="[% dep.fieldname %]_edit_container" class="edit_me bz_default_hidden" >
(<a href="#" id="[% dep.fieldname %]_edit_action">edit</a>)
</span>
<script type="text/javascript">
hideEditableField('[% dep.fieldname %]_edit_container',
'[% dep.fieldname %]_input_area',
'[% dep.fieldname %]_edit_action',
'[% dep.fieldname %]',
"[% bug.${dep.fieldname}.join(', ') %]");
</script>
[% END %]
</div>
[% END %]
[% accesskey = undef %]
[% END %]
[%############################################################################%]
[%# Block for Time Tracking Group #%]
[%############################################################################%]
[% BLOCK section_timetracking %]
<table class="bz_time_tracking_table">
<tr>
<th>
<label for="estimated_time">Orig. Est.</label>
</th>
<th>
Current Est.
</th>
<th>
<label for="work_time">Hours Worked</label>
</th>
<th>
<label for="remaining_time">Hours Left</label>
</th>
<th>
%Complete
</th>
<th>
Gain
</th>
<th>
<label for="deadline">Deadline</label>
</th>
</tr>
<tr>
<td>
<input name="estimated_time" id="estimated_time"
value="[% PROCESS formattimeunit
time_unit=bug.estimated_time %]"
size="6" />
</td>
<td>
[% PROCESS formattimeunit
time_unit=(bug.actual_time + bug.remaining_time) %]
</td>
<td>
[% PROCESS formattimeunit time_unit=bug.actual_time %] +
<input name="work_time" id="work_time"
value="0" size="3"
onchange="adjustRemainingTime();" onkeyup="adjustRemainingTime();" />
</td>
<td>
<input name="remaining_time" id="remaining_time"
value="[% PROCESS formattimeunit
time_unit=bug.remaining_time %]"
size="6" onchange="updateRemainingTime();" onkeyup="updateRemainingTime();" />
</td>
<td>
[% PROCESS calculatepercentage act=bug.actual_time
rem=bug.remaining_time %]
</td>
<td>
[% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %]
</td>
<td>
<input name="deadline" id="deadline" value="[% bug.deadline %]"
size="10" maxlength="10" /><br />
<script type="text/javascript">
Calendar.set('deadline');
</script>
<small>(YYYY-MM-DD)</small>
</td>
</tr>
<tr>
<td colspan="7" class="bz_summarize_time">
<a href="summarize_time.cgi?id=[% bug.bug_id %]&amp;do_depends=1">
Summarize time (including time for [% terms.bugs %]
blocking this [% terms.bug %])</a>
</td>
</tr>
</table>
[% END %]
[%############################################################################%]
[%# Block for the Additional Comments box #%]
[%############################################################################%]
[% BLOCK comment_box %]
<div class="bz_section_additional_comments">
<a name="add_comment"></a>
[% IF user.id %]
<label for="comment_textarea" accesskey="c"><b>Additional
<u>C</u>omments</b></label>:
[% IF user.is_insider %]
<input type="checkbox" name="commentprivacy" value="1"
id="newcommentprivacy"
onclick="updateCommentTagControl(this, form)" />
<label for="newcommentprivacy">Private</label>
[% END %]
[% IF Param('allow_commentsilent') %]
<input type="checkbox" name="commentsilent" value="1" id="commentsilent" />
<label for="commentsilent">Silent</label>
<input type="checkbox" name="cmt_worktime" value="1" id="cmt_worktime"
onclick="if(this.checked)document.getElementById('commentsilent').checked=true" />
<label for="cmt_worktime">Worktime only</label>
[% END %]
<!-- This table keeps the submit button aligned with the box. -->
<table[% ' width="100%"' IF user.settings.comment_width.value == 'on' %]><tr><td>
[% INCLUDE global/textarea.html.tmpl
name = 'comment'
id = 'comment_textarea'
minrows = 10
maxrows = 25
cols = constants.COMMENT_COLS
style = (user.settings.comment_width.value == 'on' ? 'width: 100%' : '')
%]
[% Hook.process("after_comment_textarea", 'bug/edit.html.tmpl') %]
<div style="margin-top: 5px">
[% PROCESS commit_button id="" nobr=0%]
</div>
<table class="status" cellspacing="0" cellpadding="0">
<tr>
<td class="field_label">
<label for="bug_status"><a href="page.cgi?id=fields.html#status">Status</a>:</label>
</td>
<td style="padding-left: 8px">
<a name="bug_status_bottom"></a>
[% PROCESS bug/knob.html.tmpl %]
</td>
</tr>
</table>
</td></tr></table>
[%# For logged-out users %]
[% ELSE %]
<table><tr><td><fieldset>
<legend>Note</legend>
You need to
<a href="show_bug.cgi?id=
[%- bug.bug_id %]&amp;GoAheadAndLogIn=1">log in</a>
before you can comment on or make changes to this [% terms.bug %].
</fieldset></table><tr></td>
[% END %]
</div>
[% END %]
[%############################################################################%]
[%# Block for INPUT fields #%]
[%############################################################################%]
[% BLOCK input %]
[% val = bug.$inputname %]
[% IF bug.check_can_change_field(inputname, 0, 1) %]
<input id="[% inputname %]" name="[% inputname %]" class="text_input"
value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
[% " maxlength=\"$maxlength\"" IF maxlength %] />
[% ELSE %]
[% IF size && val.length > size %]
<span title="[% val FILTER html %]">
[% val FILTER truncate(size) FILTER html %]
</span>
[% ELSE %]
[% val FILTER html %]
[% END %]
[% END %]
[% no_td = 0 %]
[% maxlength = 0 %]
[% colspan = 0 %]
[% size = 0 %]
[% value = undef %]
[% spellcheck = undef %]
[% END %]
[% BLOCK commit_button %]
[% IF user.id %]
[% w = BLOCK %]
[% look_in_wiki = bug.component_obj.wiki_url || bug.product_obj.wiki_url || Param('wiki_url') %]
[% IF look_in_wiki %]
[% look_in_wiki = look_in_wiki _ 'Bug_$BUG' %]
[% look_in_urls.push([ 'Wiki', look_in_wiki ]) %]
[% END %]
[% IF look_in_urls %]
Look for [% terms.Bug %] in:
[% FOREACH link = look_in_urls %]
[% IF !loop.first %], [% END %]
<a href="[% link.1.replace('\\$BUG', bug.bug_id) | html %]">[% link.0 | html %]</a>
[% END %]
[% END %]
[% END %]
<div class="knob-buttons">
[% IF nobr %][% w %][% ELSE %]<input type="button" value="Preview" onclick="showcommentpreview()" tabindex="-1" />[% END %]
<input type="submit" value="Save Changes" id="commit[% id FILTER css_class_quote %]" />
[% IF bug.user.canmove %]
<input type="submit" name="action" id="action[% id FILTER css_class_quote %]" value="[% Param("move-button-text") %]" />
[% END %]
[% IF NOT nobr %]<p style="margin: 0.5em 0">[% w %]</p>[% END %]
</div>
[% END %]
[% END %]
[%############################################################################%]
[%# Block for SCRUM CARDS #%]
[%############################################################################%]
[% BLOCK scrum_cards %]
| <a href="scrum.cgi?id=[% bug.bug_id %]" class="search-link" target="_blank">Scrum card</a>
[% END %]