diff options
Diffstat (limited to 'template/en/default/bug/create')
-rw-r--r-- | template/en/default/bug/create/comment-guided.txt.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/bug/create/create-guided.html.tmpl | 200 | ||||
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 359 |
3 files changed, 258 insertions, 309 deletions
diff --git a/template/en/default/bug/create/comment-guided.txt.tmpl b/template/en/default/bug/create/comment-guided.txt.tmpl index 0f68d28..66220ec 100644 --- a/template/en/default/bug/create/comment-guided.txt.tmpl +++ b/template/en/default/bug/create/comment-guided.txt.tmpl @@ -30,17 +30,13 @@ [%+ cgi.param("comment") IF cgi.param("comment") %] -[% IF cgi.param("reproducible") %] -[%+ IF cgi.param("reproducible") != "Choose one..." -%] +[%+ IF cgi.param("reproducible") != "Choose one..." -%] Reproducible: [%+ cgi.param("reproducible") %] -[% END %] [% END %] -[% IF cgi.param("reproduce_steps") %] -[% IF !(cgi.param("reproduce_steps").match('^1\.\s*2\.\s*3\.\s*$') || cgi.param("reproduce_steps").match('^\s*$')) %] +[% IF !(cgi.param("reproduce_steps").match('^1\.\s*2\.\s*3\.\s*$') || cgi.param("reproduce_steps").match('^\s*$')) %] Steps to Reproduce: [%+ cgi.param("reproduce_steps") %] -[% END %] [% END %] [% IF cgi.param("actual_results") -%] diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 0628a0e..bee5f01 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -34,6 +34,8 @@ style = "#somebugs { width: 100%; height: 500px }" %] +[% style = "" %] + [% tablecolour = "#efefef" %] [%# This script displays the descriptions for selected components. %] @@ -57,51 +59,20 @@ function PutDescription() { var initialowners = new Array([% product.components.size %]); var last_initialowner; -var initialccs = new Array([% product.components.size %]); var components = new Array([% product.components.size %]); -var flags = new Array([% product.components.size %]); -[% IF Param("useqacontact") %] - var initialqacontacts = new Array([% product.components.size %]); - var last_initialqacontact; -[% END %] [% count = 0 %] [%- FOREACH c = product.components %] components[[% count %]] = "[% c.name FILTER js %]"; initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; - [% flag_list = [] %] - [% FOREACH f = c.flag_types.bug %] - [% NEXT UNLESS f.is_active %] - [% flag_list.push(f.id) %] - [% END %] - [% FOREACH f = c.flag_types.attachment %] - [% NEXT UNLESS f.is_active %] - [% flag_list.push(f.id) %] - [% END %] - flags[[% count %]] = [[% flag_list.join(",") FILTER js %]]; - [% IF Param("useqacontact") %] - initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; - [% END %] - - [% SET initial_cc_list = [] %] - [% FOREACH cc_user = c.initial_cc %] - [% initial_cc_list.push(cc_user.login) %] - [% END %] - initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]"; - [% count = count + 1 %] [%- END %] function set_assign_to() { // Based on the selected component, fill the "Assign To:" field - // with the default component owner, and the "QA Contact:" field - // with the default QA Contact. It also selectively enables flags. + // with the default component owner. var form = document.Create; var assigned_to = form.assigned_to.value; -[% IF Param("useqacontact") %] - var qa_contact = form.qa_contact.value; -[% END %] - var index = -1; if (form.component.type == 'select-one') { index = form.component.selectedIndex; @@ -118,137 +89,83 @@ function set_assign_to() { form.assigned_to.value = owner; last_initialowner = owner; } - - document.getElementById('initial_cc').innerHTML = initialccs[index]; - - [% IF Param("useqacontact") %] - var contact = initialqacontacts[index]; - if (qa_contact == last_initialqacontact - || qa_contact == contact - || qa_contact == '') { - form.qa_contact.value = contact; - last_initialqacontact = contact; - } - [% END %] - - // First, we disable all flags. Then we re-enable those - // which are available for the selected component. - var inputElements = document.getElementsByTagName("select"); - var inputElement, flagField; - for ( var i=0 ; i<inputElements.length ; i++ ) { - inputElement = inputElements.item(i); - if (inputElement.name.search(/^flag_type-(\d+)$/) != -1) { - var id = inputElement.name.replace(/^flag_type-(\d+)$/, "$1"); - inputElement.disabled = true; - // Also disable the requestee field, if it exists. - inputElement = document.getElementById("requestee_type-" + id); - if (inputElement) inputElement.disabled = true; - } - } - // Now enable flags available for the selected component. - for (var i = 0; i < flags[index].length; i++) { - flagField = document.getElementById("flag_type-" + flags[index][i]); - // Do not enable flags the user cannot set nor request. - if (flagField && flagField.options.length > 1) { - flagField.disabled = false; - // Re-enabling the requestee field depends on the status - // of the flag. - toggleRequesteeField(flagField, 1); - } - } } PutDescription(); } -function handleWantsAttachment(wants_attachment) { - if (wants_attachment) { - document.getElementById('attachment_false').style.display = 'none'; - document.getElementById('attachment_true').style.display = 'block'; - } - else { - document.getElementById('attachment_false').style.display = 'block'; - document.getElementById('attachment_true').style.display = 'none'; - clearAttachmentFields(); - } -} - // this is courtesy of John Keller -var LOOKUP_ADDR = "/lookup.php?pkg="; -var ASSIGNEE_OBJ_NAME = "assigned_to"; -var NOT_FOUND = "NOT_FOUND"; - var http_connection = null; // init XMLHttpRequest object, based on browser type function initHttpConnection() { - http_connection = null; - - try { - // Firefox, Opera 8.0+, Safari - http_connection = new XMLHttpRequest(); - } catch (e) { - // Internet Explorer - try { - http_connection = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - http_connection = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - // browser does not support AJAX - } - } - } - - if (http_connection != null) { - http_connection.onreadystatechange = onLoadMaintainer; - } + http_connection = null; + + try { + // Firefox, Opera 8.0+, Safari + http_connection = new XMLHttpRequest(); + } catch (e) { + // Internet Explorer + try { + http_connection = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + http_connection = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) { + // browser does not support AJAX + } + } + } + + if (http_connection != null) { + http_connection.onreadystatechange = onLoadMaintainer; + } } // handler for data received // text field to set should be similar to // <input name="assigned_to" id="assigned_to" /> function onLoadMaintainer() { - var field_obj; - - if ((http_connection.readyState == 4) && (http_connection.status == 200)) { - if ((http_connection.responseText != null) && (http_connection.responseText != NOT_FOUND)) { - if ((field_obj = document.getElementById(ASSIGNEE_OBJ_NAME)) != null) { - field_obj.value = http_connection.responseText; - } - } - } else { - // by default, we'll leave form value alone and don't do anything else - // this is a good place to set a default or show an error, though - } + var field_obj; + + if ((http_connection.readyState == 4) && (http_connection.status == 200)) { + if ((http_connection.responseText != null) && (http_connection.responseText != 'NOT_FOUND')) { + if ((field_obj = document.getElementById('assigned_to')) != null) { + field_obj.value = http_connection.responseText; + } + } + } else { + // by default, we'll leave form value alone and don't do anything else + // this is a good place to set a default or show an error, though + } } // handler for when user enters a package // text field to set should be similar to // <input name="cf_rpmpkg" onchange="onChangePackage(this)" /> function onChangePackage(input_obj) { - initHttpConnection(); + initHttpConnection(); - if ((http_connection != null) && (input_obj.value != "")) { - http_connection.open("GET", LOOKUP_ADDR + encodeURIComponent(input_obj.value)); - http_connection.send(null); - } + if ((http_connection != null) && (input_obj.value != "")) { + http_connection.open("GET", '/lookup.php?pkg=' + encodeURIComponent(input_obj.value)); + http_connection.send(null); + } }; --> </script> -<p> Submit a bug using the <a href="enter_bug.cgi?product=[% product.name FILTER html %]">expert bug form</a>.</p> +<p> Submit [% terms.abug %] using the +<a href="enter_bug.cgi?product=[% product.name FILTER html %]">expert [% terms.bug %] form</a>.</p> -<form method="post" action="post_bug.cgi"> +<form name="Create" id="Create" method="post" action="post_bug.cgi"> <input type="hidden" name="format" value="guided"> - <input type="hidden" name="assigned_to" value=""> <input type="hidden" name="priority" value="[% default.priority FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> - <input type="hidden" name="op_sys" value="Linux"> + <input type="hidden" name="op_sys" value="[% Param('defaultopsys') FILTER html %]"> <table valign="top" cellpadding="5" cellspacing="5" border="0"> @@ -298,6 +215,7 @@ function onChangePackage(input_obj) { </td> </tr> </table> + <p> The area where the problem occurs. To pick the right component, you could use the same one as @@ -344,7 +262,7 @@ function onChangePackage(input_obj) { <td valign="top"> <input type="text" size="80" name="cf_rpmpkg" value="" onchange="onChangePackage(this)"> <p> - This is where you can identify exactly which RPM package is involved in this bug report. For instance, + This is where you can identify exactly which RPM package is involved in this [% terms.bug %] report. For instance, if you know the problem you are having is with the program <tt>mysqld</tt>, then execute <tt>rpm -qif /usr/sbin/mysqld</tt>. This will tell you the name and version of the RPM package (i.e. MySQL-5.0.27-1mga1) as well as other information. In particular, you are looking for @@ -404,13 +322,11 @@ function onChangePackage(input_obj) { cols = constants.COMMENT_COLS defaultcontent = "Description of problem:\n\n\nVersion-Release number of selected component (if applicable):\n\n\nHow reproducible:\n\n\nSteps to Reproduce:\n1.\n2.\n3.\n" %] - [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] - <br /> - <input type="checkbox" id="commentprivacy" name="commentprivacy" - [% " checked=\"checked\"" IF commentprivacy %]> - <label for="commentprivacy"> - Initial Description is Private - </label> + [% IF user.is_insider %] + <br> + <input type="checkbox" id="comment_is_private" name="comment_is_private" + [% ' checked="checked"' IF comment_is_private %]> + <label for="comment_is_private">Initial Description is Private</label> [% END %] <p> @@ -475,16 +391,18 @@ function onChangePackage(input_obj) { <b>Assign To:</b> </td> <td valign="top"> - [% safe_assigned_to = FILTER js; bug.assigned_to.login; END %] [% INCLUDE global/userselect.html.tmpl - id => "assigned_to" - name => "assigned_to" - value => bug.assigned_to.login - size => 32 + id => "assigned_to" + name => "assigned_to" + value => "" + emptyok => 1 + size => 32 %] <p>Leave the above blank to assign to the default component owner.</p> </td> </tr> + + [% Hook.process('form') %] </table> <p> diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 4b17457..c18e1c5 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -30,11 +30,13 @@ [% PROCESS global/header.html.tmpl title = title - style_urls = [ 'skins/standard/create_attachment.css', - 'skins/standard/yui/calendar.css' ] - javascript_urls = [ "js/attachment.js", "js/util.js", "js/yui/calendar.js", - "js/field.js", "js/TUI.js" ] - onload = 'set_assign_to();' + yui = [ 'autocomplete', 'calendar', 'datatable', 'button' ] + style_urls = [ 'skins/standard/attachment.css', + 'skins/standard/enter_bug.css' ] + javascript_urls = [ "js/attachment.js", "js/util.js", + "js/field.js", "js/TUI.js", "js/bug.js" ] + onload = "set_assign_to(); hideElementById('attachment_true'); + showElementById('attachment_false'); showElementById('btn_no_attachment');" %] <script type="text/javascript"> @@ -128,9 +130,10 @@ function set_assign_to() { if (inputElement.name.search(/^flag_type-(\d+)$/) != -1) { var id = inputElement.name.replace(/^flag_type-(\d+)$/, "$1"); inputElement.disabled = true; - // Also disable the requestee field, if it exists. + // Also hide the requestee field, if it exists. inputElement = document.getElementById("requestee_type-" + id); - if (inputElement) inputElement.disabled = true; + if (inputElement) + YAHOO.util.Dom.addClass(inputElement.parentNode, 'bz_default_hidden'); } } // Now enable flags available for the selected component. @@ -147,18 +150,11 @@ function set_assign_to() { } } -function handleWantsAttachment(wants_attachment) { - if (wants_attachment) { - document.getElementById('attachment_false').style.display = 'none'; - document.getElementById('attachment_true').style.display = 'block'; - } - else { - document.getElementById('attachment_false').style.display = 'block'; - document.getElementById('attachment_true').style.display = 'none'; - clearAttachmentFields(); - } -} - +var status_comment_required = new Array(); +[% FOREACH status = bug_status %] + status_comment_required['[% status.name FILTER js %]'] = + [% status.comment_required_on_change_from() ? 'true' : 'false' %] +[% END %] TUI_alternates['expert_fields'] = 'Show Advanced Fields'; // Hide the Advanced Fields by default, unless the user has a cookie @@ -168,20 +164,13 @@ TUI_hide_default('expert_fields'); --> </script> -[% USE Bugzilla %] -[% SET select_fields = {} %] -[% FOREACH field = Bugzilla.get_fields( - { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) -%] - [% select_fields.${field.name} = field %] -[% END %] - <form name="Create" id="Create" method="post" action="post_bug.cgi" - enctype="multipart/form-data"> + class="enter_bug_form" enctype="multipart/form-data" + onsubmit="return validateEnterBug(this)"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> -<table cellspacing="4" cellpadding="2" border="0"> +<table> <tbody> <tr> <td colspan="4"> @@ -210,22 +199,26 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th>Product:</th> - <td width="10%">[% product.name FILTER html %]</td> - - <th>Reporter:</th> - <td width="100%">[% user.login FILTER html %]</td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.product, editable = 0, + value = product.name %] + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.reporter, editable = 0, + value = user.login %] </tr> [%# We can't use the select block in these two cases for various reasons. %] <tr> - <th class="required"> - <a href="describecomponents.cgi?product=[% product.name FILTER url_quote %]"> - Component</a>: - </th> - <td> - <select name="component" onchange="set_assign_to();" size="7" - aria-required="true" class="required"> + [% component_desc_url = BLOCK -%] + describecomponents.cgi?product=[% product.name FILTER url_quote %] + [% END %] + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.component editable = 1 + desc_url = component_desc_url + %] + <td id="field_container_component"> + <select name="component" id="component" onchange="set_assign_to();" + size="7" aria-required="true" class="required"> [%# Build the lists of assignees and QA contacts if "usemenuforusers" is enabled. %] [% IF Param("usemenuforusers") %] [% assignees_list = user.get_userlist.clone %] @@ -234,7 +227,13 @@ TUI_hide_default('expert_fields'); [%- FOREACH c = product.components %] <option value="[% c.name FILTER html %]" - [% " selected=\"selected\"" IF c.name == default.component_ %]> + id="v[% c.id FILTER html %]_component" + [% IF c.name == default.component_ %] + [%# This is for bug/field.html.tmpl, for visibility-related + # controls. %] + [% default.component_id = c.id %] + selected="selected" + [% END %]> [% c.name FILTER html -%] </option> [% IF Param("usemenuforusers") %] @@ -245,9 +244,16 @@ TUI_hide_default('expert_fields'); [% END %] [%- END %] </select> + + <script type="text/javascript"> + <!-- + [%+ INCLUDE "bug/field-events.js.tmpl" + field = bug_fields.component %] + //--> + </script> </td> - <td colspan="2"> + <td colspan="2" id="comp_desc_container"> [%# Enclose the fieldset in a nested table so that its width changes based # on the length on the component description. %] <table> @@ -264,9 +270,11 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th rowspan="3">Version:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.version editable = 1 rowspan = 3 + %] <td rowspan="3"> - <select name="version" size="5"> + <select name="version" id="version" size="5"> [%- FOREACH v = version %] <option value="[% v FILTER html %]" [% ' selected="selected"' IF v == default.version %]>[% v FILTER html -%] @@ -276,35 +284,50 @@ TUI_hide_default('expert_fields'); </td> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.bug_severity, editable = 1, + bug = default, field = bug_fields.bug_severity, editable = 1, value = default.bug_severity %] </tr> <tr> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.rep_platform, editable = 1, + bug = default, field = bug_fields.rep_platform, editable = 1, value = default.rep_platform %] </tr> <tr> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.op_sys, editable = 1, + bug = default, field = bug_fields.op_sys, editable = 1, value = default.op_sys %] </tr> + [% IF !Param('defaultplatform') || !Param('defaultopsys') %] + <tr> + <th colspan="3"> </th> + <td id="os_guess_note" class="comment"> + <div>We've made a guess at your + [% IF Param('defaultplatform') %] + operating system. Please check it + [% ELSIF Param('defaultopsys') %] + platform. Please check it + [% ELSE %] + operating system and platform. Please check them + [% END %] + and make any corrections if necessary.</div> + </td> + </tr> + [% END %] </tbody> <tbody class="expert_fields"> <tr> [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] - [% sel = { description => 'Target Milestone', name => 'target_milestone' } %] - [% INCLUDE select %] + [% INCLUDE select field = bug_fields.target_milestone %] [% ELSE %] <td colspan="2"> </td> [% END %] [% IF Param('letsubmitterchoosepriority') %] [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.priority, editable = 1, + bug = default, field = bug_fields.priority, editable = 1, value = default.priority %] [% ELSE %] <td colspan="2"> </td> @@ -312,40 +335,16 @@ TUI_hide_default('expert_fields'); </tr> </tbody> -[% IF !Param('defaultplatform') || !Param('defaultopsys') %] - <tbody> - <tr> - <th> </th> - <td colspan="3" class="comment"> - We've made a guess at your - [% IF Param('defaultplatform') %] - operating system. Please check it - [% ELSIF Param('defaultopsys') %] - platform. Please check it - [% ELSE %] - operating system and platform. Please check them - [% END %] - and make any corrections if necessary. - </td> - </tr> - </tbody> -[% END %] - <tbody class="expert_fields"> <tr> <td colspan="4"> </td> </tr> <tr> -[% IF bug_status.size <= 1 %] - <input type="hidden" name="bug_status" - value="[% default.bug_status FILTER html %]"> - <th>Initial State:</th> - <td>[% display_value("bug_status", default.bug_status) FILTER html %]</td> -[% ELSE %] - [% sel = { description => 'Initial State', name => 'bug_status' } %] - [% INCLUDE select %] -[% END %] + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.bug_status, + editable = (bug_status.size > 1), value = default.bug_status + override_legal_values = bug_status %] <td> </td> [%# Calculate the number of rows we can use for flags %] @@ -376,9 +375,12 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th><a href="page.cgi?id=fields.html#assigned_to">Assign To</a>:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.assigned_to editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "assigned_to" name => "assigned_to" value => assigned_to disabled => assigned_to_disabled @@ -392,9 +394,12 @@ TUI_hide_default('expert_fields'); [% IF Param("useqacontact") %] <tr> - <th>QA Contact:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.qa_contact editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "qa_contact" name => "qa_contact" value => qa_contact disabled => qa_contact_disabled @@ -408,9 +413,12 @@ TUI_hide_default('expert_fields'); [% END %] <tr> - <th>CC:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.cc editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "cc" name => "cc" value => cc disabled => cc_disabled @@ -421,7 +429,7 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th>Default CC:</th> + <th>Default [% field_descs.cc FILTER html %]:</th> <td colspan="2"> <div id="initial_cc"> </div> @@ -434,17 +442,17 @@ TUI_hide_default('expert_fields'); [% IF user.is_timetracker %] <tr> - <th>Estimated Hours:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.estimated_time editable = 1 + %] <td colspan="2"> <input name="estimated_time" size="6" maxlength="6" value="[% estimated_time FILTER html %]"> </td> </tr> <tr> - <th>Deadline:</th> - <td colspan="2"> - <input name="deadline" size="10" maxlength="10" value="[% deadline FILTER html %]"> - <small>(YYYY-MM-DD)</small> - </td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.deadline, value = deadline, + editable = 1, value_span = 2 %] </tr> <tr> @@ -454,7 +462,9 @@ TUI_hide_default('expert_fields'); [% IF Param("usebugaliases") %] <tr> - <th>Alias:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.alias editable = 1 + %] <td colspan="2"> <input name="alias" size="20" value="[% alias FILTER html %]"> </td> @@ -462,21 +472,23 @@ TUI_hide_default('expert_fields'); [% END %] <tr> - <th>URL:</th> - <td colspan="2"> - <input name="bug_file_loc" size="40" - value="[% bug_file_loc FILTER html %]"> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.bug_file_loc editable = 1 + %] + <td colspan="2" class="field_value"> + <input name="bug_file_loc" id="bug_file_loc" class="text_input" + size="40" value="[% bug_file_loc FILTER html %]"> </td> </tr> </tbody> -<tbody class="expert_fields"> +<tbody> [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] [% NEXT UNLESS field.enter_bug %] [% SET value = ${field.name}.defined ? ${field.name} : "" %] - <tr> + <tr [% 'class="expert_fields"' IF !field.is_mandatory %]> [% INCLUDE bug/field.html.tmpl bug = default, field = field, value = value, editable = 1, value_span = 3 %] @@ -487,17 +499,55 @@ TUI_hide_default('expert_fields'); <tbody> <tr> - <th class="required">Summary:</th> - <td colspan="3"> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.short_desc editable = 1 + %] + <td colspan="3" class="field_value"> <input name="short_desc" size="70" value="[% short_desc FILTER html %]" maxlength="255" spellcheck="true" aria-required="true" - class="required"> + class="required text_input" id="short_desc"> </td> </tr> + [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %] + <tr id="possible_duplicates_container" class="bz_default_hidden"> + <th>Possible<br>Duplicates:</th> + <td colspan="3"> + <div id="possible_duplicates"></div> + <script type="text/javascript"> + var dt_columns = [ + { key: "id", label: "[% field_descs.bug_id FILTER js %]", + formatter: YAHOO.bugzilla.dupTable.formatBugLink }, + { key: "summary", + label: "[% field_descs.short_desc FILTER js %]", + formatter: "text" }, + { key: "status", + label: "[% field_descs.bug_status FILTER js %]", + formatter: YAHOO.bugzilla.dupTable.formatStatus }, + { key: "update_token", label: '', + formatter: YAHOO.bugzilla.dupTable.formatCcButton } + ]; + YAHOO.bugzilla.dupTable.addCcMessage = "Add Me to the CC List"; + YAHOO.bugzilla.dupTable.init({ + container: 'possible_duplicates', + columns: dt_columns, + product_name: '[% product.name FILTER js %]', + summary_field: 'short_desc', + options: { + MSG_LOADING: 'Searching for possible duplicates...', + MSG_EMPTY: 'No possible duplicates found.', + SUMMARY: 'Possible Duplicates' + } + }); + </script> + </td> + </tr> + [% END %] + <tr> <th>Description:</th> <td colspan="3"> + [% defaultcontent = BLOCK %] [% IF cloned_bug_id %] +++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ @@ -525,34 +575,28 @@ TUI_hide_default('expert_fields'); <th> </th> <td colspan="3"> - <input type="checkbox" id="commentprivacy" name="commentprivacy" - [% " checked=\"checked\"" IF commentprivacy %]> - <label for="commentprivacy"> - Make description private (visible only to members of the - <strong>[% Param('insidergroup') FILTER html %]</strong> group) + <input type="checkbox" id="comment_is_private" name="comment_is_private" + [% ' checked="checked"' IF comment_is_private %] + onClick="updateCommentTagControl(this, 'comment')"> + <label for="comment_is_private"> + Make description and any new attachment private (visible only to members + of the <strong>[% Param('insidergroup') FILTER html %]</strong> group) </label> </td> </tr> [% END %] + [% IF Param("maxattachmentsize") %] <tr> <th>Attachment:</th> <td colspan="3"> - <script type="text/javascript"> - <!-- - document.write( '<div id="attachment_false">' - + '<input type="button" value="Add an attachment" ' - + 'onClick="handleWantsAttachment(true)"> ' - + '<em style="display: none">This button has no ' - + 'functionality for you because your browser does ' - + 'not support CSS or does not use it.<\/em>' - + '<\/div>' - + '<div id="attachment_true" style="display: none">' - + '<input type="button" ' - + 'value="Don\'t add an attachment " ' - + 'onClick="handleWantsAttachment(false)">'); - //--> - </script> + <div id="attachment_false" class="bz_default_hidden"> + <input type="button" value="Add an attachment" onClick="handleWantsAttachment(true)"> + </div> + + <div id="attachment_true"> + <input type="button" id="btn_no_attachment" value="Don't add an attachment" + class="bz_default_hidden" onClick="handleWantsAttachment(false)"> <fieldset> <legend>Add an attachment</legend> <table class="attachment_entry"> @@ -562,35 +606,36 @@ TUI_hide_default('expert_fields'); flag_table_id ="attachment_flags" %] </table> </fieldset> - <script type="text/javascript"> - <!-- - document.write('<\/div>'); - //--> - </script> + </div> </td> </tr> + [% END %] </tbody> <tbody class="expert_fields"> [% IF user.in_group('editbugs', product.id) %] [% IF use_keywords %] <tr> - <th><a href="describekeywords.cgi">Keywords</a>:</th> - <td colspan="3"> - <input id="keywords" name="keywords" size="40" - value="[% keywords FILTER html %]"> (optional) - </td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.keywords, editable = 1, + value = keywords, desc_url = "describekeywords.cgi", + value_span = 2 + %] </tr> [% END %] <tr> - <th>Depends on:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.dependson editable = 1 + %] <td colspan="3"> <input name="dependson" accesskey="d" value="[% dependson FILTER html %]"> </td> </tr> <tr> - <th>Blocks:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.blocked editable = 1 + %] <td colspan="3"> <input name="blocked" accesskey="b" value="[% blocked FILTER html %]"> </td> @@ -599,13 +644,14 @@ TUI_hide_default('expert_fields'); </tbody> <tbody class="expert_fields"> - [% IF group.size %] + [% IF product.groups_available.size %] <tr> <th> </th> <td colspan="3"> <br> <strong> - Only users in all of the selected groups can view this [% terms.bug %]: + Only users in all of the selected groups can view this + [%+ terms.bug %]: </strong> <br> <font size="-1"> @@ -615,12 +661,14 @@ TUI_hide_default('expert_fields'); <br> <!-- Checkboxes --> - [% FOREACH g = group %] - - <input type="checkbox" id="bit-[% g.bit %]" - name="bit-[% g.bit %]" value="1" - [% " checked=\"checked\"" IF g.checked %]> - <label for="bit-[% g.bit %]">[% g.description FILTER html_light %]</label><br> + <input type="hidden" name="defined_groups" value="1"> + [% FOREACH group = product.groups_available %] + <input type="checkbox" id="group_[% group.id FILTER html %]" + name="groups" value="[% group.name FILTER html %]" + [% ' checked="checked"' IF default.groups.contains(group.name) + OR group.is_default %]> + <label for="group_[% group.id FILTER html %]"> + [%- group.description FILTER html_light %]</label><br> [% END %] </td> </tr> @@ -634,14 +682,11 @@ TUI_hide_default('expert_fields'); <tr> <th> </th> <td colspan="3"> - <input type="submit" id="commit" value="Submit [% terms.Bug %]" - onclick="if (this.form.short_desc.value == '') - { alert('Please enter a summary sentence for this [% terms.bug %].'); - return false; } return true;"> + <input type="submit" id="commit" value="Submit [% terms.Bug %]"> <input type="submit" name="maketemplate" id="maketemplate" value="Remember values as bookmarkable template" - class="expert_fields"> + onclick="bz_no_validate_enter_bug=true" class="expert_fields"> </td> </tr> </tbody> @@ -659,30 +704,20 @@ TUI_hide_default('expert_fields'); [%############################################################################%] [% BLOCK select %] - [% IF sel.description %] - <th> - <a href="page.cgi?id=fields.html#[% sel.name %]">[% sel.description %]</a>: - </th> - [% END %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field editable = 1 + %] <td> - <select name="[% sel.name %]" id="[% sel.name %]"> - [%- FOREACH x = ${sel.name} %] + <select name="[% field.name FILTER html %]" + id="[% field.name FILTER html %]"> + [%- FOREACH x = ${field.name} %] <option value="[% x FILTER html %]" - [% " selected=\"selected\"" IF x == default.${sel.name} %]> - [% display_value(sel.name, x) FILTER html %] + [% " selected=\"selected\"" IF x == default.${field.name} %]> + [% display_value(field.name, x) FILTER html %] </option> [% END %] </select> - - [% IF sel.name == "bug_status" %] - <script type="text/javascript"> - <!-- - [%+ INCLUDE "bug/field-events.js.tmpl" - field = select_fields.bug_status %] - //--> - </script> - [% END %] </td> [% END %] |