summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/edit.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/bug/edit.html.tmpl')
-rw-r--r--template/en/default/bug/edit.html.tmpl219
1 files changed, 121 insertions, 98 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index a4d6813..dbc23c8 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -30,14 +30,6 @@
[% PROCESS bug/time.html.tmpl %]
-[% USE Bugzilla %]
-[% 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">
<!--
@@ -78,6 +70,7 @@
[% IF user.is_insider %]
if (document.getElementById('isprivate_' + real_id).checked) {
document.getElementById('newcommentprivacy').checked = 'checked';
+ updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment');
}
[% END %]
@@ -136,10 +129,19 @@
[% END %]
+ /* Index all classifications so we can keep track of the classification
+ * for the selected product, which could control field visibility.
+ */
+ var all_classifications = new Array([% bug.choices.product.size %]);
+ [%- FOREACH product = bug.choices.product %]
+ all_classifications['[% product.name FILTER js %]'] = '
+ [%- product.classification.name FILTER js %]';
+ [%- END %]
+
//-->
</script>
-<form name="changeform" method="post" action="process_bug.cgi">
+<form name="changeform" id="changeform" method="post" action="process_bug.cgi">
<input type="hidden" name="delta_ts" value="[% bug.delta_ts %]">
<input type="hidden" name="longdesclength" value="[% bug.comments.size %]">
@@ -211,23 +213,11 @@
</tr>
</table>
- [%# *** Additional Comments *** %]
- <div id="comments">
- [% PROCESS bug/comments.html.tmpl
- comments = bug.comments
- mode = user.id ? "edit" : "show"
- %]
- </div>
<table id="bz_big_form_parts" cellspacing="0" cellpadding="0"><tr>
<td>
-
- [% PROCESS comment_box %]
-
- <tr>
- <td colspan="3">
- <hr id="bz_top_half_spacer">
- </td>
- </tr>
+ [% IF user.is_timetracker %]
+ [% PROCESS section_timetracking %]
+ [% END %]
[%# *** Attachments *** %]
@@ -238,12 +228,28 @@
show_attachment_flags = bug.show_attachment_flags
%]
+ [% IF user.settings.comment_box_position.value == 'before_comments' %]
+ [% PROCESS comment_box %]
+ [% END %]
</td>
<td>
[% PROCESS section_restrict_visibility %]
</td>
</tr></table>
+ [%# *** Additional Comments *** %]
+ <div id="comments">
+ [% PROCESS bug/comments.html.tmpl
+ comments = bug.comments
+ mode = user.id ? "edit" : "show"
+ %]
+ </div>
+
+ [% IF user.settings.comment_box_position.value == 'after_comments' %]
+ <hr>
+ [% PROCESS comment_box %]
+ [% END %]
+
</form>
[%############################################################################%]
@@ -323,26 +329,36 @@
[%#############%]
[%# PRODUCT #%]
[%#############%]
-
<tr>
[% INCLUDE bug/field.html.tmpl
- bug = bug, field = select_fields.product,
+ bug = bug, field = bug_fields.product,
override_legal_values = bug.choices.product
desc_url = 'describecomponents.cgi', value = bug.product
editable = bug.check_can_change_field('product', 0, 1) %]
</tr>
+
+ [%# Classification is here so that it can be used in value controllers
+ # and visibility controllers. It comes after product because
+ # it uses some javascript that depends on the existence of the
+ # product field.
+ #%]
+ <tr class="bz_default_hidden">
+ [% INCLUDE bug/field.html.tmpl
+ bug = bug field = bug_fields.classification
+ override_legal_values = bug.choices.classification
+ value = bug.classification
+ editable = bug.check_can_change_field('product', 0, 1) %]
+ </tr>
[%###############%]
[%# Component #%]
[%###############%]
<tr>
- <td class="field_label">
- <label for="component" accesskey="m">
- <b><a href="describecomponents.cgi?product=[% bug.product FILTER url_quote %]">
- Co<u>m</u>ponent</a>:
- </b>
- </label>
- </td>
- [% PROCESS select selname => "component" %]
+ [% INCLUDE bug/field.html.tmpl
+ bug = bug, field = bug_fields.component, value = bug.component
+ override_legal_values = bug.choices.component
+ desc_url = "describecomponents.cgi?product=$bug.product"
+ editable = bug.check_can_change_field('component', 0, 1)
+ %]
</tr>
<tr>
<td class="field_label">
@@ -360,11 +376,11 @@
</td>
<td class="field_value">
[% INCLUDE bug/field.html.tmpl
- bug = bug, field = select_fields.rep_platform,
+ bug = bug, field = bug_fields.rep_platform,
no_tds = 1, value = bug.rep_platform
editable = bug.check_can_change_field('rep_platform', 0, 1) %]
[%+ INCLUDE bug/field.html.tmpl
- bug = bug, field = select_fields.op_sys,
+ bug = bug, field = bug_fields.op_sys,
no_tds = 1, value = bug.op_sys
editable = bug.check_can_change_field('op_sys', 0, 1) %]
<script type="text/javascript">
@@ -411,7 +427,7 @@
[% BLOCK section_details2 %]
[%###############################################################%]
- [%# Importance (priority, severity and votes) #%]
+ [%# Importance (priority and severity) #%]
[%###############################################################%]
<tr>
<td class="field_label">
@@ -420,30 +436,15 @@
</td>
<td>
[% INCLUDE bug/field.html.tmpl
- bug = bug, field = select_fields.priority,
+ bug = bug, field = bug_fields.priority,
no_tds = 1, value = bug.priority
editable = bug.check_can_change_field('priority', 0, 1) %]
- <b><a href="page.cgi?id=fields.html#importance"><u>S</u>everity</a></b></label>:
+ <b><a href="page.cgi?id=fields.html#importance"><u>S</u>everity</a></b></label>:
[%+ INCLUDE bug/field.html.tmpl
- bug = bug, field = select_fields.bug_severity,
+ bug = bug, field = bug_fields.bug_severity,
no_tds = 1, value = bug.bug_severity
editable = bug.check_can_change_field('bug_severity', 0, 1) %]
- [% 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 %]
+ [% Hook.process('after_importance', 'bug/edit.html.tmpl') %]
</td>
</tr>
@@ -483,6 +484,7 @@
id => "assigned_to"
name => "assigned_to"
value => bug.assigned_to.login
+ classes => ["bz_userfield"]
size => 30
%]
<br>
@@ -525,6 +527,7 @@
name => "qa_contact"
value => bug.qa_contact.login
size => 30
+ classes => ["bz_userfield"]
emptyok => 1
%]
<br>
@@ -554,11 +557,11 @@
[%############################################################################%]
[% BLOCK section_url_keyword_whiteboard %]
[%# *** URL Whiteboard Keywords *** %]
+[% IF Param('useurl') %]
<tr>
<td class="field_label">
<label for="bug_file_loc" accesskey="u"><b>
- [% IF bug.bug_file_loc
- AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
+ [% IF is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>
[% ELSE %]
<u>U</u>RL
@@ -568,8 +571,7 @@
<td>
[% IF bug.check_can_change_field("bug_file_loc", 0, 1) %]
<span id="bz_url_edit_container" class="bz_default_hidden">
- [% IF bug.bug_file_loc
- AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
+ [% IF is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]" target="_blank"
title="[% bug.bug_file_loc FILTER html %]">
[% bug.bug_file_loc FILTER truncate(40) FILTER html %]</a>
@@ -580,7 +582,8 @@
[% END %]
<span id="bz_url_input_area">
[% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
- [% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1) %]
+ [% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1)
+ AND is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]">[% url_output FILTER none %]</a>
[% ELSE %]
[% url_output FILTER none %]
@@ -597,6 +600,7 @@
[% END %]
</td>
</tr>
+[% END %]
[% IF Param('usestatuswhiteboard') %]
<tr>
@@ -613,8 +617,13 @@
<label for="keywords" accesskey="k">
<b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
</td>
- [% PROCESS input inputname => "keywords" size => 40 colspan => 2
- value => bug.keywords.join(', ') %]
+ <td class="field_value" colspan="2">
+ [% INCLUDE bug/field.html.tmpl
+ bug = bug, field = bug_fields.keywords, value = bug.keywords
+ editable = bug.check_can_change_field("keywords", 0, 1),
+ no_tds = 1
+ %]
+ </td>
</tr>
[% END %]
[% END %]
@@ -676,14 +685,15 @@
[% END %]
[% IF group.ingroup %]
- <input type="hidden" name="defined_bit-[% group.bit %]" value="1">
+ <input type="hidden" name="defined_groups"
+ value="[% group.name FILTER html %]">
[% END %]
- <input type="checkbox" value="1" name="bit-[% group.bit %]"
- id="bit-[% group.bit %]"
+ <input type="checkbox" value="[% group.name FILTER html %]"
+ name="groups" id="group_[% group.bit %]"
[% ' checked="checked"' IF group.ison %]
[% ' disabled="disabled"' IF NOT group.ingroup %]>
- <label for="bit-[% group.bit %]">
+ <label for="group_[% group.bit %]">
[%- group.description FILTER html_light %]</label>
<br>
[% END %]
@@ -803,9 +813,11 @@
including you
[% END %]
[% END %]
- <span id="cc_edit_area_showhide_container" class="bz_default_hidden">
- (<a href="#" id="cc_edit_area_showhide">[% IF user.id %]edit[% ELSE %]show[% END %]</a>)
- </span>
+ [% IF user.id || bug.cc.size %]
+ <span id="cc_edit_area_showhide_container" class="bz_default_hidden">
+ (<a href="#" id="cc_edit_area_showhide">[% IF user.id %]edit[% ELSE %]show[% END %]</a>)
+ </span>
+ [% END %]
<div id="cc_edit_area">
<br>
[% IF user.id %]
@@ -816,6 +828,7 @@
name => "newcc"
value => ""
size => 30
+ classes => ["bz_userfield"]
multiple => 5
%]
</div>
@@ -835,13 +848,15 @@
[% END %]
[% END %]
</div>
- <script type="text/javascript">
- hideEditableField( 'cc_edit_area_showhide_container',
- 'cc_edit_area',
- 'cc_edit_area_showhide',
- '',
- '');
- </script>
+ [% IF user.id || bug.cc.size %]
+ <script type="text/javascript">
+ hideEditableField( 'cc_edit_area_showhide_container',
+ 'cc_edit_area',
+ 'cc_edit_area_showhide',
+ '',
+ '');
+ </script>
+ [% END %]
</td>
</tr>
[% END %]
@@ -899,13 +914,19 @@
[% BLOCK section_customfields %]
[%# *** Custom Fields *** %]
-
+ [% USE Bugzilla %]
[% FOREACH field = Bugzilla.active_custom_fields %]
<tr>
- [% PROCESS bug/field.html.tmpl value=bug.${field.name}
+ [% PROCESS bug/field.html.tmpl value = bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1)
value_span = 2 %]
</tr>
+ [% IF extra_field_item %]
+ <tr>
+ <th class="field_label">[% extra_field_item.header FILTER none %]</th>
+ <td>[% extra_field_item.data FILTER none %]</td>
+ </tr>
+ [% END %]
[% END %]
[% END %]
@@ -1022,9 +1043,9 @@
[% 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 />
- <small>(YYYY-MM-DD)</small>
+ [% INCLUDE bug/field.html.tmpl
+ field = bug_fields.deadline, value = bug.deadline, no_tds = 1
+ editable = bug.check_can_change_field('deadline', 0, 1) %]
</td>
</tr>
<tr>
@@ -1042,16 +1063,15 @@
[%############################################################################%]
[% BLOCK comment_box %]
- <div class="bz_section_additional_comments">
- <a name="add_comment"></a>
+ <div id="add_comment" class="bz_section_additional_comments">
[% IF user.id %]
<label for="comment" accesskey="c"><b>Additional
<u>C</u>omments</b></label>:
[% IF user.is_insider %]
- <input type="checkbox" name="commentprivacy" value="1"
+ <input type="checkbox" name="comment_is_private" value="1"
id="newcommentprivacy"
- onClick="updateCommentTagControl(this, form)">
+ onClick="updateCommentTagControl(this, 'comment')">
<label for="newcommentprivacy">
Make comment private (visible only to members of the
<strong>[% Param('insidergroup') FILTER html %]</strong> group)
@@ -1071,13 +1091,13 @@
<br>
[% PROCESS commit_button id=""%]
- <table class="status" cellspacing="0" cellpadding="0">
+ <table id="bug_status_bottom"
+ class="status" cellspacing="0" cellpadding="0">
<tr>
<td class="field_label">
<b><a href="page.cgi?id=fields.html#status">Status</a></b>:
</td>
<td>
- <a name="bug_status_bottom"></a>
[% PROCESS bug/knob.html.tmpl %]
</td>
</tr>
@@ -1086,13 +1106,19 @@
[%# 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>
+ <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>
+ </td>
+ </tr>
+ </table>
[% END %]
</div>
[% END %]
@@ -1157,9 +1183,6 @@
<div class="knob-buttons">
<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 %]
</div>
[% END %]
[% END %]