summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/create/create.html.tmpl46
-rw-r--r--template/en/default/global/header.html.tmpl21
2 files changed, 56 insertions, 11 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index a59fe9112..0733de02a 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -30,10 +30,11 @@
[% PROCESS global/header.html.tmpl
title = title
- yui = [ 'autocomplete', 'calendar' ]
- style_urls = [ 'skins/standard/attachment.css' ]
+ yui = [ 'autocomplete', 'calendar', 'datatable' ]
+ 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/field.js", "js/TUI.js", "js/bug.js" ]
onload = 'set_assign_to();'
%]
@@ -169,7 +170,7 @@ TUI_hide_default('expert_fields');
</script>
<form name="Create" id="Create" method="post" action="post_bug.cgi"
- enctype="multipart/form-data">
+ class="enter_bug_form" enctype="multipart/form-data">
<input type="hidden" name="product" value="[% product.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
@@ -508,13 +509,48 @@ TUI_hide_default('expert_fields');
<td colspan="3">
<input name="short_desc" size="70" value="[% short_desc FILTER html %]"
maxlength="255" spellcheck="true" aria-required="true"
- class="required">
+ class="required" 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 %]" },
+ { 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 %] +++
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 3d7fc2e68..75fa71825 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -52,6 +52,7 @@
[% SET yui_css = {
autocomplete => 1,
calendar => 1,
+ datatable => 1,
} %]
[%# Note: This is simple dependency resolution--you can't have dependencies
@@ -60,6 +61,7 @@
#%]
[% SET yui_deps = {
autocomplete => ['json', 'connection', 'datasource'],
+ datatable => ['json', 'connection', 'datasource', 'element'],
} %]
@@ -99,7 +101,20 @@
[% END %]
[% style_urls.unshift('skins/standard/global.css') %]
+ [%# YUI dependency resolution %]
+ [%# We have to do this in a separate array, because modifying the
+ # existing array by unshift'ing dependencies confuses FOREACH.
+ #%]
+ [% SET yui_resolved = [] %]
+ [% FOREACH yui_name = yui %]
+ [% FOREACH yui_dep = yui_deps.${yui_name}.reverse %]
+ [% yui_resolved.push(yui_dep) IF NOT yui_resolved.contains(yui_dep) %]
+ [% END %]
+ [% yui_resolved.push(yui_name) IF NOT yui_resolved.contains(yui_name) %]
+ [% END %]
+ [% SET yui = yui_resolved %]
+ [%# YUI CSS %]
[% FOREACH yui_name = yui %]
[% IF yui_css.$yui_name %]
<link rel="stylesheet" type="text/css"
@@ -218,12 +233,6 @@
<script src="js/yui/yahoo-dom-event/yahoo-dom-event.js"
type="text/javascript"></script>
<script src="js/yui/cookie/cookie-min.js" type="text/javascript"></script>
- [%# Resolve YUI dependencies. Note that CSS was already done above. %]
- [% FOREACH yui_name = yui %]
- [% IF yui_deps.$yui_name %]
- [% yui = yui_deps.${yui_name}.merge(yui) %]
- [% END %]
- [% END %]
[% FOREACH yui_name = yui %]
<script type="text/javascript"
src="js/yui/[% yui_name FILTER html %]/